Supermodel
Supermodel copied to clipboard
fixed `-Wformat-overflow` compiler warnings / added missing newline to log messages
Some examples for reference:
Src/OSD/SDL/Main.cpp:1086:30: warning: ‘ (Paused)’ directive writing 9 bytes into a region of size between 1 and 128 [-Wformat-overflow=]
1086 | sprintf(titleStr, "%s (Paused)", baseTitleStr);
| ^~~~~~~~~
Src/OSD/SDL/Main.cpp:1086:16: note: ‘sprintf’ output between 10 and 137 bytes into a destination of size 128
1086 | sprintf(titleStr, "%s (Paused)", baseTitleStr);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Src/OSD/Logger.cpp:382:29: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 4088 [-Wformat-overflow=]
382 | sprintf(string2, "[Error] %s\n", string1);
| ^~ ~~~~~~~
Src/OSD/Logger.cpp:382:10: note: ‘sprintf’ output between 10 and 4105 bytes into a destination of size 4096
382 | sprintf(string2, "[Error] %s\n", string1);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Will you be able to make the suggested changes?
Will you be able to make the suggested changes?
Yes. Hopefully I finally get to it this week.
There are additional warnings now but I cannot change that file because there are some issues with the line endings.
Src/Debugger/CPU/68KDebug.cpp:1353:56: note: ‘sprintf’ output between 15 and 64 bytes into a destination of size 50
1353 | sprintf(moveStr, "movem.%c %s,[AM2]", sizeC, regList);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~