[gnumeric] compilation: suppress warning



commit a89939e97bf384cb2dd0c22bce6f932816c59413
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue May 3 17:45:32 2011 -0600

    compilation: suppress warning
    
    2011-05-03  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/workbook.c (workbook_sheet_state_diff): disable
    	-Wswitch for this function

 ChangeLog      |    5 +++++
 src/workbook.c |   17 +++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f1d4f30..bd5940a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-03  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/workbook.c (workbook_sheet_state_diff): disable 
+	-Wswitch for this function
+
 2011-05-01  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/colrow.c (colrow_set_states): use colrow_free, not g_free;
diff --git a/src/workbook.c b/src/workbook.c
index 36229e9..a8fa5c3 100644
--- a/src/workbook.c
+++ b/src/workbook.c
@@ -1331,6 +1331,15 @@ workbook_sheet_state_size (const WorkbookSheetState *wss)
 	return size;
 }
 
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+#pragma GCC diagnostic push
+#endif
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
+#pragma GCC diagnostic ignored "-Wswitch"
+	/* Suppressing the warning about the case values not be named */
+	/* enum values */
+#endif
+
 char *
 workbook_sheet_state_diff (const WorkbookSheetState *wss_a, const WorkbookSheetState *wss_b)
 {
@@ -1431,6 +1440,14 @@ workbook_sheet_state_diff (const WorkbookSheetState *wss_a, const WorkbookSheetS
 	}
 }
 
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+#pragma GCC diagnostic pop
+#else
+#pragma GCC diagnostic warning "-Wswitch"
+#endif
+#endif
+
 /* ------------------------------------------------------------------------- */
 
 GSF_CLASS (Workbook, workbook,



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