fixed printf format codes for gnu c++ compilers