#491 Compiler warnings with -Wformat

closed
nobody
5
2012-09-14
2012-01-09
Cristian Greco
No

Hi,

compiling with -Wformat on 64bit architectures (both on GNU/Linux and GNU/kFreeBSD) causes the following warnings:

src/NumberParser.cpp: In static member function 'static bool Poco::NumberParser::tryParse64(const string&, Poco::Int64&)':
src/NumberParser.cpp:121:62: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'Poco::Int64 {aka long int}' [-Wformat]
src/NumberParser.cpp: In static member function 'static bool Poco::NumberParser::tryParseUnsigned64(const string&, Poco::UInt64&)':
src/NumberParser.cpp:138:62: warning: format '%llu' expects argument of type 'long long unsigned int
', but argument 3 has type 'Poco::UInt64 {aka long unsigned int}' [-Wformat]
src/NumberParser.cpp: In static member function 'static bool Poco::NumberParser::tryParseHex64(const string&, Poco::UInt64&)':
src/NumberParser.cpp:155:62: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Poco::UInt64 {aka long unsigned int*}' [-Wformat]

Discussion

  • fixed in 1.4.3, SVN rev. 1715