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]