From: Antonio Ospite Date: Fri, 30 Sep 2011 21:00:42 +0000 (+0200) Subject: kinect_upload_fw: really fix -Wformat warnings about sizeof() X-Git-Tag: v0.1~5 X-Git-Url: https://git.ao2.it/kinect-audio-setup.git/commitdiff_plain/833744083efbcdfdf3bad938f76e5ca9388d9cac?hp=833744083efbcdfdf3bad938f76e5ca9388d9cac kinect_upload_fw: really fix -Wformat warnings about sizeof() Use "%zu" when printing the result of a sizeof(), this way the integer conversion is done correctly taking into account the particular architecture. On a PPC64 (PlayStation 3) we were getting: kinect_upload_fw.c: In function ‘get_reply’: kinect_upload_fw.c:99:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat] kinect_upload_fw.c: In function ‘main’: kinect_upload_fw.c:169:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat] kinect_upload_fw.c:194:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat] kinect_upload_fw.c:220:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat] ---