fix type-punning warning with -fstrict-aliasing
fix printf format warnings