Errors in ui_theme_manager.c

After updating to version 1.4, my ESP-IDF project no longer compiles:

lib/ui/ui_theme_manager.c: In function '_ui_style_value_convert':
lib/ui/ui_theme_manager.c:81:80: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
   81 |              || property==LV_STYLE_COLOR_FILTER_DSC && property==LV_STYLE_ANIM && property==LV_STYLE_TRANSITION) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What do you want to achieve?

Well, what do YOU (squareline developers) want to achieve with the above line of code? I am just as clueless as the compiler. No idea which operator you are assuming to have precedence over the other.

I want to achieve that squareline generates code that actually compiles.


  • SquareLine Studio version: 1.4
  • Operating system: MacOS 13.0.1
  • Target hardware: ESP32-S3

Normally in C the && operator has precedence over || operator so this shouldn’t lead to an error that stops compilation. Meanwhile we too realized that some C compilers don’t rely on this standard precedence, so those extra parentheses have been added to the source-code to support those too. Theme code will get some more refinements in the future anyway, based on our further tests and your feedbacks.

Thank you @Hermit, this answers it and the issue can be considered solved.

1 Like