GNOME Bugzilla – Bug 162582
gcc4 compile warnings
Last modified: 2018-06-29 20:48:52 UTC
gnucash CVS HEAD export CC=/usr/bin/gcc4 ./autogen.sh make - many gcc4 warnings - but compile dies because of -Werror -- unitialized vars -- sign mismatch between char, and xmlChar -- signals should be guint instead of gint
Created attachment 35311 [details] [review] fix gcc4 warnings
Hmm.. I'm always hesitant to add cast's to code, because an explicit cast can many times hide/mask other bugs.
Created attachment 35325 [details] [review] gcc4 patches without the casts for char/gchar/xmlChar
I've removed all the char casts from the patch. The patch now fixes some unitialized variables, some ignored const qualifiers on function return values, and some gint -> guint mistypes. I don't know about an specific flag in gcc4 to supress signed/unsinged mismatch warnings. I suggest just removing -Werror when compiling with gcc4.
This is much better. I'm still concerned about removing the const-ness of the GUID code. Those returned objects should still be const. If there are errors associated with them it's due to how those functions are being used. The uses should be changed, rather than the source functions.
I've applied all of this latest patch to HEAD except the change to guid.[ch]. Thanks. I'm closing this bug. Please open a new one if you decide to change the GUID code.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=162582. Please update any external references or bookmarks.