Unused Variable 'target' Warning when Compiling

What do you want to achieve?

My ui.c contains lv_obj_t * target = lv_event_get_target(e); in 147 places which is not used for anything. This generates warning: unused variable 'target' [-Wunused-variable] 147 times since it is not used.

Why is this line of code being generated if it is not used?

Screenshot or video

Here is one example:
image

Others

  • **SquareLine Studio version: 1.3.1
  • **Operating system: Windows 10 x64
  • **Target hardware: ESP32-S3, ESP-IDF 5.1, LVGL 8.3.6

Just a +1, this exists for me as well. Warnings like this cause lots of noise in the build log.

Thanks for the report, we added it to our todo list.

Just bumping as these warnings still exist in SDS 1.3.3.

We have already started working on eliminating warnings during export. It is expected that they will be resolved in the next release.

1 Like