summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-10-06 21:19:42 +0200
committerBenjamin Otte <otte@redhat.com>2017-10-06 21:23:39 +0200
commit43c212ac28f5f80e10c49590e569b6450098743f (patch)
treeae5210d90f79d313d3b4c88c88f5e00b87405e0e /gtk/gtkpathbar.c
parent2ac66328a3edc0838c19b49fcb9468c473936c9c (diff)
downloadgtk+-43c212ac28f5f80e10c49590e569b6450098743f.tar.gz
build: Enable -Wswitch-enum and -Wswitch-default
This patch makes that work using 1 of 2 options: 1. Add all missing enums to the switch statement or 2. Cast the switch argument to a uint to avoid having to do that (mostly for GdkEventType). I even found a bug while doing that: clearing a GtkImage with a surface did not notify thae surface property. The reason for enabling this flag even though it is tedious at times is that it is very useful when adding values to an enum, because it makes GTK immediately warn about all the switch statements where this enum is relevant. And I expect changes to enums to be frequent during the GTK4 development cycle.
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 899fc1bbaf..e58927feab 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -1230,6 +1230,8 @@ set_button_image_get_info_cb (GCancellable *cancellable,
g_set_object (&data->path_bar->priv->desktop_icon, icon);
break;
+ case NORMAL_BUTTON:
+ case ROOT_BUTTON:
default:
break;
};
@@ -1309,6 +1311,8 @@ set_button_image (GtkPathBar *path_bar,
set_button_image_get_info_cb,
data);
break;
+
+ case NORMAL_BUTTON:
default:
break;
}