lvgl / lv_demos

Examples, tutorials and applications for the LVGL embedded GUI library
https://lvgl.io
492 stars 366 forks source link

Fix variable shadowing build error #86

Closed babldev closed 3 years ago

babldev commented 3 years ago

On OSX 10.15.4

docker build -t lvgl_simulator .
lv_examples/src/lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1.c: In function 'ta_event_cb':
lv_examples/src/lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1.c:27:36: error: declaration of 'ta' shadows a global declaration [-Werror=shadow]
 static void ta_event_cb(lv_obj_t * ta, lv_event_t e)
                                    ^~
lv_examples/src/lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1.c:5:19: note: shadowed declaration is here
 static lv_obj_t * ta;
                   ^~
cc1: all warnings being treated as errors
Makefile:45: recipe for target 'lv_examples/src/lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1.o' failed

The function parameter ta is shadowing a static variable at the top of the file with the same name.