GNOME Bugzilla – Bug 618404
Uses 32-bit x86 formatters for printing numeric values using printf, etc.
Last modified: 2011-01-15 15:14:03 UTC
For example, when doing: int64 int64_value = 1; int64_value.to_string(); This is what gcc outputs on AMD64 (with -Wall) : warning: format ‘%lli’ expects type ‘long long int’, but argument 2 has type ‘gint64’ It would be good if vala could be changed to use the correct format strings for the target architecture instead of hardcoding the 32-bit x86 ones. This also breaks stuff like: print("%li", int64_value); which results in Vala giving: error: Argument 2: Cannot convert from `int64' to `long' print("%li", int64_value); ^^^^^^^^^^^ although "%li" is the correct format for int64 on amd64 architecture.
Created attachment 161087 [details] [review] Patch uses GLib FORMAT to fix format warnings
*** Bug 561692 has been marked as a duplicate of this bug. ***
commit e87cb2aa84c8981b051507899c704c9f63b64c6f Author: Geert Jordaens <geert.jordaens@telenet.be> Date: Wed Aug 4 11:33:02 2010 -0700 glib-2.0: Use GLib FORMAT where possible to fix format warnings Fixes bug #618404.
*** Bug 618782 has been marked as a duplicate of this bug. ***