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.
This commit is contained in:
Matthias Clasen 2012-11-29 22:45:24 -05:00
parent 6400eeba35
commit 9ba32fec6e

View File

@ -1251,6 +1251,7 @@ get_next_site (GtkExpander *expander,
case GTK_DIR_RIGHT: case GTK_DIR_RIGHT:
return FOCUS_WIDGET; return FOCUS_WIDGET;
} }
break;
case FOCUS_WIDGET: case FOCUS_WIDGET:
switch (direction) switch (direction)
{ {
@ -1264,8 +1265,8 @@ get_next_site (GtkExpander *expander,
return FOCUS_LABEL; return FOCUS_LABEL;
case GTK_DIR_RIGHT: case GTK_DIR_RIGHT:
return ltr ? FOCUS_LABEL : FOCUS_NONE; return ltr ? FOCUS_LABEL : FOCUS_NONE;
break;
} }
break;
case FOCUS_LABEL: case FOCUS_LABEL:
switch (direction) switch (direction)
{ {
@ -1279,8 +1280,8 @@ get_next_site (GtkExpander *expander,
return FOCUS_CHILD; return FOCUS_CHILD;
case GTK_DIR_RIGHT: case GTK_DIR_RIGHT:
return ltr ? FOCUS_CHILD : FOCUS_WIDGET; return ltr ? FOCUS_CHILD : FOCUS_WIDGET;
break;
} }
break;
case FOCUS_CHILD: case FOCUS_CHILD:
switch (direction) switch (direction)
{ {
@ -1293,6 +1294,7 @@ get_next_site (GtkExpander *expander,
case GTK_DIR_RIGHT: case GTK_DIR_RIGHT:
return FOCUS_NONE; return FOCUS_NONE;
} }
break;
} }
g_assert_not_reached (); g_assert_not_reached ();