I noticed that a few of the printf statements use the wrong type specifier for one of the arguments. These were flagged by clang's -Wformat, for example:
main.c:1245:96: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
..."Received %d bytes, expected a maximum of %d on frame %d.\n", numBytes, sizeof(ps1_ram_buffer), frame);
~~ ^~~~~~~~~~~~~~~~~~~~~~
%lu
I noticed that a few of the printf statements use the wrong type specifier for one of the arguments. These were flagged by clang's
-Wformat
, for example: