After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336395 - Compilation warning about type-casting breaking compilation in AMD64.
Compilation warning about type-casting breaking compilation in AMD64.
Status: RESOLVED FIXED
Product: gossip
Classification: Deprecated
Component: General
0.10.x
Other Linux
: Normal normal
: ---
Assigned To: Gossip Maintainers
Gossip Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-28 20:12 UTC by Caio Marcelo de Oliveira Filho
Modified: 2006-04-07 18:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Uses G_GSIZE_FORMAT instead of "%d" for printing gsize variables. (1.59 KB, patch)
2006-04-07 13:16 UTC, Caio Marcelo de Oliveira Filho
none Details | Review

Description Caio Marcelo de Oliveira Filho 2006-03-28 20:12:59 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));
Comment 1 Richard Hult 2006-03-29 19:25:09 UTC
Fixed in CVS, thanks!
Comment 2 Caio Marcelo de Oliveira Filho 2006-04-07 13:14:51 UTC
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.
Comment 3 Caio Marcelo de Oliveira Filho 2006-04-07 13:16:19 UTC
Created attachment 62910 [details] [review]
Uses G_GSIZE_FORMAT instead of "%d" for printing gsize variables.
Comment 4 Richard Hult 2006-04-07 18:48:02 UTC
Thanks, committed!