lvgl / lvgl_esp32_drivers

Drivers for ESP32 to be used with LVGL
MIT License
339 stars 285 forks source link

Warnings during compilation in develop branch #165

Closed arktrin closed 2 years ago

arktrin commented 2 years ago

I'm getting some warning during compilation using latest develop branch:

../components/lvgl_esp32_drivers/lvgl_tft/ili9481.c: In function 'ili9481_flush':
../components/lvgl_esp32_drivers/lvgl_tft/ili9481.c:117:81: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
         if (mybuf == NULL)  LV_LOG_WARN("Could not allocate enough DMA memory!");
                                                                                 ^
../components/lvgl_esp32_drivers/lvgl_tft/ili9481.c: In function 'ili9481_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/ili9481.c:192:17: warning: unused variable 'orientation_str' [-Wunused-variable]
     const char *orientation_str[] = {
                 ^~~~~~~~~~~~~~~
[1105/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/ili9486.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c: In function 'ili9486_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c:168:17: warning: unused variable 'orientation_str' [-Wunused-variable]
     const char *orientation_str[] = {
                 ^~~~~~~~~~~~~~~
[1107/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/st7735s.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/st7735s.c: In function 'st7735s_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/st7735s.c:208:17: warning: unused variable 'orientation_str' [-Wunused-variable]
     const char *orientation_str[] = {
                 ^~~~~~~~~~~~~~~
[1110/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/st7796s.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/st7796s.c: In function 'st7796s_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/st7796s.c:192:14: warning: unused variable 'orientation_str' [-Wunused-variable]
  const char *orientation_str[] = {
              ^~~~~~~~~~~~~~~
[1112/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/ili9488.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/ili9488.c: In function 'ili9488_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/ili9488.c:192:17: warning: unused variable 'orientation_str' [-Wunused-variable]
     const char *orientation_str[] = {
                 ^~~~~~~~~~~~~~~
[1117/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/GC9A01.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/GC9A01.c: In function 'GC9A01_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/GC9A01.c:224:17: warning: unused variable 'orientation_str' [-Wunused-variable]
     const char *orientation_str[] = {
                 ^~~~~~~~~~~~~~~
[1119/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/ili9163c.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/ili9163c.c: In function 'ili9163c_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/ili9163c.c:226:14: warning: unused variable 'orientation_str' [-Wunused-variable]
  const char *orientation_str[] = {
              ^~~~~~~~~~~~~~~
[1120/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/jd79653a.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/jd79653a.c: In function 'jd79653a_lv_fb_flush':
../components/lvgl_esp32_drivers/lvgl_tft/jd79653a.c:412:12: warning: unused variable 'len' [-Wunused-variable]
     size_t len = ((area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1)) / 8;
            ^~~
At top level:
../components/lvgl_esp32_drivers/lvgl_tft/jd79653a.c:179:13: warning: 'jd79653a_spi_send_fb' defined but not used [-Wunused-function]
 static void jd79653a_spi_send_fb(uint8_t *data, size_t len)
             ^~~~~~~~~~~~~~~~~~~~
[1121/1130] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/uc8151d.c.obj
../components/lvgl_esp32_drivers/lvgl_tft/uc8151d.c: In function 'uc8151d_lv_fb_flush':
../components/lvgl_esp32_drivers/lvgl_tft/uc8151d.c:199:12: warning: unused variable 'len' [-Wunused-variable]
     size_t len = ((area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1)) / 8;
            ^~~
At top level:
../components/lvgl_esp32_drivers/lvgl_tft/uc8151d.c:104:13: warning: 'uc8151d_spi_send_seq' defined but not used [-Wunused-function]
 static void uc8151d_spi_send_seq(const uc8151d_seq_t *seq, size_t len)
             ^~~~~~~~~~~~~~~~~~~~
../components/lvgl_esp32_drivers/lvgl_tft/uc8151d.c:97:13: warning: 'uc8151d_spi_send_fb' defined but not used [-Wunused-function]
 static void uc8151d_spi_send_fb(uint8_t *data, size_t len)
             ^~~~~~~~~~~~~~~~~~~
C47D commented 2 years ago

Closed with #166