GNOME Bugzilla – Bug 168859
Build failure on AMD64: gnome-program.c:1931: error: invalid initializer
Last modified: 2005-03-01 13:49:37 UTC
Distribution/Version: Ubuntu (Hoary), AMD64 [ CC'ing Kjartan, since it seems he broke it :) ] The change to libgnome/gnome-program.c in revision 1.73 broke the build on AMD64. The error is as follows: gnome-program.c: In function `gnome_program_init_paramv': gnome-program.c:1931: error: invalid initializer The relevant change can be seen here: http://cvs.gnome.org/viewcvs/libgnome/libgnome/gnome-program.c?r1=1.72&r2=1.73 This initialiser will only work if the va_list type is an integer or pointer type. On AMD64 Linux, it appears to be an array type, so we get a compiler error. It probably affects some other platforms too. Note that even though args was uninitialised, it doesn't get used by gnome_program_init_common() if nparams != -1, so nothing bad happens. To protect against using the unitialised variable, an assertion like the following could be added to gnome_program_init_paramv(): g_return_val_if_fail (nparams >= 0, NULL); This should ensure that the problem is never occurs, but will probably still leave the warning ...
Setting 2.10.0 Gnome milestone.
Please check the solution in bug #168387. I'll commit that one and do another release if that works for all cases. *** This bug has been marked as a duplicate of 168387 ***