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 168859 - Build failure on AMD64: gnome-program.c:1931: error: invalid initializer
Build failure on AMD64: gnome-program.c:1931: error: invalid initializer
Status: RESOLVED DUPLICATE of bug 168387
Product: libgnome
Classification: Deprecated
Component: general
HEAD
Other Linux
: Normal critical
: ---
Assigned To: libgnome maintainer
libgnome maintainer
Depends on:
Blocks:
 
 
Reported: 2005-03-01 09:48 UTC by James Henstridge
Modified: 2005-03-01 13:49 UTC
See Also:
GNOME target: 2.10.0
GNOME version: 2.9/2.10



Description James Henstridge 2005-03-01 09:48:08 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 ...
Comment 1 James Henstridge 2005-03-01 09:50:41 UTC
Setting 2.10.0 Gnome milestone.
Comment 2 Kjartan Maraas 2005-03-01 13:49:37 UTC
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 ***