AUDIT: r17567 - gnucash/trunk/src - Do not treat -Wstrict-aliasing warnings as errors in files using G_LOCK.
Andreas Köhler
andi5 at cvs.gnucash.org
Fri Sep 19 12:25:57 EDT 2008
Author: andi5
Date: 2008-09-19 12:25:57 -0400 (Fri, 19 Sep 2008)
New Revision: 17567
Trac: http://svn.gnucash.org/trac/changeset/17567
Modified:
gnucash/trunk/src/backend/file/io-gncxml-v2.c
gnucash/trunk/src/gnome-utils/gnc-html.c
gnucash/trunk/src/gnome/dialog-print-check.c
Log:
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
Modified: gnucash/trunk/src/backend/file/io-gncxml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/io-gncxml-v2.c 2008-09-19 16:09:23 UTC (rev 17566)
+++ gnucash/trunk/src/backend/file/io-gncxml-v2.c 2008-09-19 16:25:57 UTC (rev 17567)
@@ -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 */
Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c 2008-09-19 16:09:23 UTC (rev 17566)
+++ gnucash/trunk/src/gnome/dialog-print-check.c 2008-09-19 16:25:57 UTC (rev 17567)
@@ -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
Modified: gnucash/trunk/src/gnome-utils/gnc-html.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-html.c 2008-09-19 16:09:23 UTC (rev 17566)
+++ gnucash/trunk/src/gnome-utils/gnc-html.c 2008-09-19 16:25:57 UTC (rev 17567)
@@ -53,7 +53,15 @@
#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 */
GtkWidget * container; /* parent of the gtkhtml widget */
More information about the gnucash-changes
mailing list