GNOME Bugzilla – Bug 336395
Compilation warning about type-casting breaking compilation in AMD64.
Last modified: 2006-04-07 18:48:02 UTC
gossip-log.c: In function `log_set_nick': gossip-log.c:600: warning: int format, different type arg (arg 3) gossip-log.c:607: warning: int format, different type arg (arg 3) The program takes gsize type as equals to int (using %d in the message string). I think in AMD64 maybe the casting is not so obvious for the compiler (or maybe glibc uses another type than int as "backend" for gsize). I fixed here enforcing the type cast in the length parameter for DEBUG_MSG. E.g.: DEBUG_MSG (("Log: The nick key file:'%s' has been saved with %d bytes of data", filename, (int) length));
Fixed in CVS, thanks!
The same warnings came back in log_set_name and log_set_own_name. I discovered the "portable" way of solving this, using G_GSIZE_FORMAT instead of "%d". Patch coming in a minute.
Created attachment 62910 [details] [review] Uses G_GSIZE_FORMAT instead of "%d" for printing gsize variables.
Thanks, committed!