AUDIT: r16823 - gnucash/trunk/src/business - 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:10:59 EST 2008
Author: andi5
Date: 2008-01-06 10:10:59 -0500 (Sun, 06 Jan 2008)
New Revision: 16823
Trac: http://svn.gnucash.org/trac/changeset/16823
Modified:
gnucash/trunk/src/business/business-core/business-core.i
gnucash/trunk/src/business/business-gnome/business-urls.c
gnucash/trunk/src/business/business-gnome/dialog-invoice.c
Log:
Complete gcc-4.2 fixes by disabling -Waddress in some business source files.
BP
Modified: gnucash/trunk/src/business/business-core/business-core.i
===================================================================
--- gnucash/trunk/src/business/business-core/business-core.i 2008-01-06 12:44:35 UTC (rev 16822)
+++ gnucash/trunk/src/business/business-core/business-core.i 2008-01-06 15:10:59 UTC (rev 16823)
@@ -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/trunk/src/business/business-gnome/business-urls.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-urls.c 2008-01-06 12:44:35 UTC (rev 16822)
+++ gnucash/trunk/src/business/business-gnome/business-urls.c 2008-01-06 15:10:59 UTC (rev 16823)
@@ -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/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2008-01-06 12:44:35 UTC (rev 16822)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2008-01-06 15:10:59 UTC (rev 16823)
@@ -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