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 456879 - AMD64 printf compiler warnings for SfiTime/SfiNum
AMD64 printf compiler warnings for SfiTime/SfiNum
Status: RESOLVED FIXED
Product: beast
Classification: Other
Component: general
SVN trunk
Other All
: Normal minor
: m0.7
Assigned To: Beast Maintainers
Beast Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-14 15:06 UTC by Stefan Westerfeld
Modified: 2007-08-13 21:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes AMD64 printf compiler warnings (1.85 KB, patch)
2007-07-14 15:13 UTC, Stefan Westerfeld
none Details | Review

Description Stefan Westerfeld 2007-07-14 15:06:20 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.
Comment 1 Stefan Westerfeld 2007-07-14 15:13:19 UTC
Created attachment 91777 [details] [review]
fixes AMD64 printf compiler warnings
Comment 2 Tim Janik 2007-08-13 20:55:22 UTC
thanks, the patch looks good, please commit.
Comment 3 Stefan Westerfeld 2007-08-13 21:52:13 UTC
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.