[gtk+/gtk-3-6] GtkExpander: Clarify a nested switch
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-6] GtkExpander: Clarify a nested switch
- Date: Fri, 4 Jan 2013 00:08:33 +0000 (UTC)
commit f294563685f09736a3f184c1d6588d9d188b7179
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 29 22:45:24 2012 -0500
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 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 6a98910..d4253e8 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]