On Jun 17, 2013 5:02 AM, "Milan Horák" <stran...@tiscali.cz> wrote: > > Hello, > > I am getting: > > g++ -Wall -O2 -I /g/boost_1_53_0 test_polygon_diff.cpp > > test_polygon_diff.cpp: In function ‘void dumpPolySet(const KI_POLYGON_SET&)’: > test_polygon_diff.cpp:84:60: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<boost::polygon::polygon_data<int> >::size_type {aka long unsigned int}’ [-Wformat] > test_polygon_diff.cpp:88:71: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::size_t {aka long unsigned int}’ [-Wformat] > > Am I doing something wrong?
No. size_t is 64 bits on a 64 bit platform while int on that same platform is 32 bits even though it's a 64 bit program. This is why I don't use size_t by choice. But for function return values like this %zd works well. The z modifier is designed for use with size_t.
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp