Skip to content

Commit 81d3c12

Browse files
authored
Merge pull request lvgl#81 from lhdjply/patch-1
py/stackctrl: Add gcc pragmas to ignore dangling-pointer warning.
2 parents 52c11cf + 16444e2 commit 81d3c12

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

py/stackctrl.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@
2828
#include "py/stackctrl.h"
2929

3030
void mp_stack_ctrl_init(void) {
31+
#if __GNUC__ >= 13
32+
#pragma GCC diagnostic push
33+
#pragma GCC diagnostic ignored "-Wdangling-pointer"
34+
#endif
3135
volatile int stack_dummy;
3236
MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
37+
#if __GNUC__ >= 13
38+
#pragma GCC diagnostic pop
39+
#endif
3340
}
3441

3542
void mp_stack_set_top(void *top) {

0 commit comments

Comments
 (0)