lvgl / lv_demos

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

fixed -Wformat string formatting issues #145

Closed nscooling closed 2 years ago

nscooling commented 2 years ago

Fixed general formatting issues in strings across examples generated by -Wformat All based on using "%d" for all integers replaced with

embeddedt commented 2 years ago

Unfortunately, I don't think it fixes the problem everywhere. Some platforms define uint32_t as unsigned int instead of long unsigned int, and then you will still get a warning if "%lu" is used.

nscooling commented 2 years ago

Sorry yes, I just realised they should be the macro PRIu32 from I'll update it to the correct macro definitions

embeddedt commented 2 years ago

FYI, LVGL has an LV_PRId32 macro that tries to gracefully handle platforms without inttypes.h, however there is no LV_PRIu32 macro at the moment.