r16824 - gnucash/branches/2.2/src/business - [r16823] Complete gcc-4.2 fixes by disabling -Waddress in some business source files.
Andreas Köhler
andi5 at cvs.gnucash.org
Sun Jan 6 10:13:08 EST 2008
Author: andi5
Date: 2008-01-06 10:13:08 -0500 (Sun, 06 Jan 2008)
New Revision: 16824
Trac: http://svn.gnucash.org/trac/changeset/16824
Modified:
gnucash/branches/2.2/src/business/business-core/business-core.i
gnucash/branches/2.2/src/business/business-gnome/business-urls.c
gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c
Log:
[r16823] Complete gcc-4.2 fixes by disabling -Waddress in some business source files.
Patch from Jerry Quinn.
Approved by cstim.
Modified: gnucash/branches/2.2/src/business/business-core/business-core.i
===================================================================
--- gnucash/branches/2.2/src/business/business-core/business-core.i 2008-01-06 15:10:59 UTC (rev 16823)
+++ gnucash/branches/2.2/src/business/business-core/business-core.i 2008-01-06 15:13:08 UTC (rev 16824)
@@ -17,6 +17,15 @@
#include "engine-helpers.h"
#include "gncBusGuile.h"
+/* Disable -Waddress. GCC 4.2 warns (and fails to compile with -Werror) when
+ * passing the address of a guid on the stack to QOF_BOOK_LOOKUP_ENTITY via
+ * gncInvoiceLookup and friends. When the macro gets inlined, the compiler
+ * emits a warning that the guid null pointer test is always true.
+ */
+#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
+# pragma GCC diagnostic ignored "-Waddress"
+#endif
+
SCM scm_init_sw_business_core_module (void);
%}
Modified: gnucash/branches/2.2/src/business/business-gnome/business-urls.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/business-urls.c 2008-01-06 15:10:59 UTC (rev 16823)
+++ gnucash/branches/2.2/src/business/business-gnome/business-urls.c 2008-01-06 15:13:08 UTC (rev 16824)
@@ -43,6 +43,15 @@
#include "dialog-vendor.h"
#include "dialog-invoice.h"
+/* Disable -Waddress. GCC 4.2 warns (and fails to compile with -Werror) when
+ * passing the address of a guid on the stack to QOF_BOOK_LOOKUP_ENTITY via
+ * gncInvoiceLookup and friends. When the macro gets inlined, the compiler
+ * emits a warning that the guid null pointer test is always true.
+ */
+#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
+# pragma GCC diagnostic ignored "-Waddress"
+#endif
+
#define HANDLE_TYPE(URL_TYPE_STR,OBJ_TYPE) { \
QofBook *book; \
GUID guid; \
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c 2008-01-06 15:10:59 UTC (rev 16823)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c 2008-01-06 15:13:08 UTC (rev 16824)
@@ -71,6 +71,15 @@
#include "gnc-plugin-page-invoice.h"
#include "gnc-main-window.h"
+/* Disable -Waddress. GCC 4.2 warns (and fails to compile with -Werror) when
+ * passing the address of a guid on the stack to QOF_BOOK_LOOKUP_ENTITY via
+ * gncInvoiceLookup and friends. When the macro gets inlined, the compiler
+ * emits a warning that the guid null pointer test is always true.
+ */
+#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
+# pragma GCC diagnostic ignored "-Waddress"
+#endif
+
#define DIALOG_NEW_INVOICE_CM_CLASS "dialog-new-invoice"
#define DIALOG_VIEW_INVOICE_CM_CLASS "dialog-view-invoice"
More information about the gnucash-changes
mailing list