Do not treat -Wstrict-aliasing warnings as errors in files using G_LOCK.

See http://bugzilla.gnome.org/show_bug.cgi?id=316221 for information why G_LOCK
breaks strict-aliasing.  GCC 4.2 introduced diagnostic pragmas and the error
seems to be most prominent on GCC >= 4.3, so a compilation with -Werror should
succeed now on most systems, at least on those it worked on before.

BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17567 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2008-09-19 16:25:57 +00:00
parent f0cb946f0c
commit 886f9f669b
3 changed files with 24 additions and 0 deletions

View File

@ -47,6 +47,14 @@
#include "gnc-xml.h"
#include "io-utils.h"
/* Do not treat -Wstrict-aliasing warnings as errors because of problems of the
* G_LOCK* macros as declared by glib. See
* http://bugzilla.gnome.org/show_bug.cgi?id=316221 for additional information.
*/
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
# pragma GCC diagnostic warning "-Wstrict-aliasing"
#endif
static QofLogModule log_module = GNC_MOD_IO;
/* map pointers, e.g. of type FILE*, to GThreads */

View File

@ -53,6 +53,14 @@
#include "gnc-ui.h"
#include "gnc-ui-util.h"
/* Do not treat -Wstrict-aliasing warnings as errors because of problems of the
* G_LOCK* macros as declared by glib. See
* http://bugzilla.gnome.org/show_bug.cgi?id=316221 for additional information.
*/
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
# pragma GCC diagnostic warning "-Wstrict-aliasing"
#endif
struct gnc_html_struct {
GtkWidget * window; /* window this html goes into */

View File

@ -95,6 +95,14 @@
#define KF_KEY_TEXT "Text"
#define KF_KEY_FILENAME "Filename"
/* Do not treat -Wstrict-aliasing warnings as errors because of problems of the
* G_LOCK* macros as declared by glib. See
* http://bugzilla.gnome.org/show_bug.cgi?id=316221 for additional information.
*/
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
# pragma GCC diagnostic warning "-Wstrict-aliasing"
#endif
/**< This enum specifies the columns used in the check format combobox. */
typedef enum format_combo_col_t {
COL_NAME = 0, /**< This column holds a copy of the check