fixed: Compile warnings + cosmetics

This fixes a whole bunch of compile warnings, removing a lot of noise when doing a full compile.
size_t is an unsigned integer type of at least 16 bit. You cannot assume that it is either 2, 4 or 8 bytes. You might try %z, I think all platforms are using something that is at least C99. Else cast to unsigned long and use %lu.