Closed faxe1008 closed 5 months ago
Can you provide the messages of the warnings you are fixing?
/home/faxe/projects/InfiniSim/main.cpp: In constructor ‘Framework::Framework(bool, int, int)’:
/home/faxe/projects/InfiniSim/main.cpp:446:38: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
446 | printf("initial free_size = %u\n", xPortGetFreeHeapSize());
| ~^ ~~~~~~~~~~~~~~~~~~~~~~
| | |
| unsigned int size_t {aka long unsigned int}
| %lu
/home/faxe/projects/InfiniSim/main.cpp: In member function ‘void Framework::refresh_screen()’:
/home/faxe/projects/InfiniSim/main.cpp:931:45: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
931 | printf("Mem: %5u used (change: %+5d, peak: %5u) %d budget left\n", mem_used, lastFreeHeapSize - currentFreeHeap, minimumEverFreeHeap, budget);
| ~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int size_t {aka long unsigned int}
| %+5ld
/home/faxe/projects/InfiniSim/main.cpp:931:56: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
931 | printf("Mem: %5u used (change: %+5d, peak: %5u) %d budget left\n", mem_used, lastFreeHeapSize - currentFreeHeap, minimumEverFreeHeap, budget);
| ~~^ ~~~~~~~~~~~~~~~~~~~
| | |
| unsigned int long unsigned int
| %5lu
Fixes warnings while compiling project :^)