[gnumeric] Add a default to switch.



commit 347900953a95322872341fc3513aab1350d2b10d
Author: J.H.M. Dassen (Ray) <jdassen debian org>
Date:   Mon Sep 13 13:11:21 2010 +0200

    Add a default to switch.
    
    This default ensures that when unhandled enum values are encountered,
    processing does not proceed (with x1, x2, y1, y2 undefined).

 plugins/openoffice/openoffice-write.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 284d09b..06086ac 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -2710,6 +2710,10 @@ odf_write_line (GnmOOExport *state, SheetObject *so)
 		y1 = res_pts[1];
 		y2 = res_pts[3];
 		break;
+	default:
+		/* This really shouldn't happen */
+		g_error ("How can we get here?");
+		g_assert(0);
 	}
 
 	odf_add_pt (state->xml, SVG "x1", x1);



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