GNOME Bugzilla – Bug 603355
Constants not correct on 64-bit archs
Last modified: 2009-11-30 20:12:39 UTC
Created attachment 148728 [details] [review] Use G_<type>_FORMAT It doesn't build fine on 64-bit archs: `generate-constants.c generate-constants.c: In function ‘main’: generate-constants.c:36: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’ generate-constants.c:37: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’ generate-constants.c:38: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’ generate-constants.c:39: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’ generate-constants.c:40: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’ generate-constants.c:41: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’ generate-constants.c:42: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’ And, notably, it produces G_MAXSIZE = -1 G_MAXSSIZE = -1 This patch uses G_<type>_FORMAT to ensure portability.
This patch works here on 32bit.
Comment on attachment 148728 [details] [review] Use G_<type>_FORMAT Okay
Review of attachment 148728 [details] [review]: Committed as 38e89942.