From 9ba32fec6e7c3658642554eb19905d93d755d94f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 29 Nov 2012 22:45:24 -0500 Subject: [PATCH] GtkExpander: Clarify a nested switch This code confused Coverity into thinking we were falling through, when we were not. Add a few explicit breaks to clear that up. --- gtk/gtkexpander.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index 6a98910b06..d4253e8588 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -1251,6 +1251,7 @@ get_next_site (GtkExpander *expander, case GTK_DIR_RIGHT: return FOCUS_WIDGET; } + break; case FOCUS_WIDGET: switch (direction) { @@ -1264,8 +1265,8 @@ get_next_site (GtkExpander *expander, return FOCUS_LABEL; case GTK_DIR_RIGHT: return ltr ? FOCUS_LABEL : FOCUS_NONE; - break; } + break; case FOCUS_LABEL: switch (direction) { @@ -1279,8 +1280,8 @@ get_next_site (GtkExpander *expander, return FOCUS_CHILD; case GTK_DIR_RIGHT: return ltr ? FOCUS_CHILD : FOCUS_WIDGET; - break; } + break; case FOCUS_CHILD: switch (direction) { @@ -1293,6 +1294,7 @@ get_next_site (GtkExpander *expander, case GTK_DIR_RIGHT: return FOCUS_NONE; } + break; } g_assert_not_reached ();