This change adds format checking to message() so the compiler will warn on incorrect printf() strings.
Once on, there were considerable signness and size errors, plus a few just plain incorrect formats. Switched most printf's to PRIu32 and similar from inttypes.h to make code portable/consistant.
Also fixed other warnings such as unused variables (especially around optimizing out debug() for example)
There is considerable intermixing of u32 and uint32_t throughout the code and these are actually different, u32 was an unsigned int, and uint32_t was a long unsigned int. Both being 32bit but for consistancy fixing this makes sense.
This change adds format checking to
message()
so the compiler will warn on incorrectprintf()
strings.Once on, there were considerable signness and size errors, plus a few just plain incorrect formats. Switched most printf's to
PRIu32
and similar from inttypes.h to make code portable/consistant.Also fixed other warnings such as unused variables (especially around optimizing out
debug()
for example)There is considerable intermixing of
u32
anduint32_t
throughout the code and these are actually different,u32
was anunsigned int
, anduint32_t
was along unsigned int
. Both being 32bit but for consistancy fixing this makes sense.