[dia] [warningectomy] avoid fwrite() unused result warning



commit 12cd7e75e98eb540d76bc1c96ae52af8beb7b031
Author: Hans Breuer <hans breuer org>
Date:   Sun Jan 26 14:37:31 2014 +0100

    [warningectomy] avoid fwrite() unused result warning
    
    Noise reduction for
    return value of 'fwrite', declared with attribute warn_unused_result
    discussion: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
    root cause: http://sourceware.org/bugzilla/show_bug.cgi?id=11959

 plug-ins/cgm/cgm.c |    9 +++++++++
 plug-ins/wpg/wpg.c |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/cgm/cgm.c b/plug-ins/cgm/cgm.c
index fc13c79..b80f483 100644
--- a/plug-ins/cgm/cgm.c
+++ b/plug-ins/cgm/cgm.c
@@ -48,6 +48,15 @@
 #define CGM_IS_RENDERER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CGM_TYPE_RENDERER))
 #define CGM_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CGM_TYPE_RENDERER, CgmRendererClass))
 
+/* Noise reduction for
+ * return value of 'fwrite', declared with attribute warn_unused_result
+ * discussion: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
+ * root cause: http://sourceware.org/bugzilla/show_bug.cgi?id=11959
+ */
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wunused-result"
+#endif
+
 GType cgm_renderer_get_type (void) G_GNUC_CONST;
 
 typedef struct _CgmRenderer CgmRenderer;
diff --git a/plug-ins/wpg/wpg.c b/plug-ins/wpg/wpg.c
index 8d8c54d..b39dced 100644
--- a/plug-ins/wpg/wpg.c
+++ b/plug-ins/wpg/wpg.c
@@ -49,6 +49,15 @@
 #include "filter.h"
 #include "plug-ins.h"
 
+/* Noise reduction for
+ * return value of 'fwrite', declared with attribute warn_unused_result
+ * discussion: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
+ * root cause: http://sourceware.org/bugzilla/show_bug.cgi?id=11959
+ */
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wunused-result"
+#endif
+
 /* format specific */
 #include "wpg_defs.h"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]