GNOME Bugzilla – Bug 330615
warning causes build failure: 'gw__scm_extras[0]' is used uninitialized
Last modified: 2018-06-29 20:57:09 UTC
Please describe the problem: When building with the default configure flags, a compiler warning causes compilation to abort: gw-engine.c: In function 'gw__tmp426_xaccQueryAddDateMatch_wrapper': gw-engine.c:16599: warning: 'gw__scm_extras[0]' is used uninitialized in this function This is with gcc 4.0.2 on Ubuntu Breezy Steps to reproduce: 1. ./configure 2. make 3. observe that 'make' fails because -Werror is specified Actual results: compilation fails. Warnings are treated as errors. Expected results: Does this happen every time? yes Other information:
Known problem. https://lists.gnucash.org/pipermail/gnucash-devel/2005-November/014591.html You're compiling with gcc4 and g-wrap 1.3, right? Either - compile against g-wrap 1.9 (instead of g-wrap-1.3.x), or - use gcc3.x (instead of gcc4.x), or - use CFLAGS="-Wno-uninitialized". I will leave this bug open because it's very likely to be reported again. We will close this as NOTGNOME sometime in the future. We might need to add an extra check in configure.in for this.
Note that a "workaround" is to ./configure --disable-error-on-warning -- but if you have OTHER compilation problems it might not catch it during make. YMMV.
*** Bug 330815 has been marked as a duplicate of this bug. ***
I've modified configure to test for this situation and fail the configure test so you know you're running in a bad configuration. It then outlines your options to correct it. This should be fixed in r13454 but I'm not going to close this bug until it's been tested and shown to work (I don't have a GGC4 system handy to test the change). Can someone test this?
I tested this change and it appears to work right. I'm closing this bug now.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=330615. Please update any external references or bookmarks.