Complete gcc-4.2 fixes by disabling -Waddress in some business source files.

Patch from Jerry Quinn.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16823 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2008-01-06 15:10:59 +00:00
parent 6e0cfe280c
commit 9e20a61028
3 changed files with 27 additions and 0 deletions

View File

@ -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);
%}

View File

@ -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; \

View File

@ -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"