GNOME Bugzilla – Bug 456879
AMD64 printf compiler warnings for SfiTime/SfiNum
Last modified: 2007-08-13 21:52:13 UTC
Since SfiTime and SfiNum are gint64, the following warning occurs on AMD64 when these are used in conjunction with printf ("%lld"...): sfiserial.c:293: warning: format '%lld' expects type 'long long int', but argument 3 has type 'SfiNum' See also: http://mail.gnome.org/archives/beast/2005-January/msg00005.html http://mail.gnome.org/archives/gtk-devel-list/2006-January/msg00128.html Patch follows.
Created attachment 91777 [details] [review] fixes AMD64 printf compiler warnings
thanks, the patch looks good, please commit.
Ok, committed/fixed: Mon Aug 13 23:38:53 2007 Stefan Westerfeld <stefan@space.twc.de> * sfiwrapper.h: Remove cyclic include dependancy between sfiwrapper.h and sfitypes.h by not longer including sfitypes.h. This will allow using things defined here in sfitypes.h, which was not possible before. * sfitypes.h: Use int64 instead of gint64 for SfiTime/SfiNum, which expands to long long on both, 32- and 64-bit systems. This will make printf ("%lld", some_sfi_num) a valid printf format (as seen by gcc), and thus some compiler warnings disappear with this change. Fixes: #456879.