[gnome-applets/wip/muktupavels/werror] gweather: fix -Wswitch-default warnings
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/muktupavels/werror] gweather: fix -Wswitch-default warnings
- Date: Sat, 4 Apr 2020 20:53:20 +0000 (UTC)
commit fb7a1609e4677a570d994188d139b38858d35849
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Apr 4 21:23:39 2020 +0300
gweather: fix -Wswitch-default warnings
gnome-applets/gweather/gweather-applet.c | 4 ++++
gnome-applets/gweather/gweather-pref.c | 8 ++++++++
gnome-applets/gweather/gweather-xml.c | 1 +
3 files changed, 13 insertions(+)
---
diff --git a/gnome-applets/gweather/gweather-applet.c b/gnome-applets/gweather/gweather-applet.c
index 22175b949..9f2cd037f 100644
--- a/gnome-applets/gweather/gweather-applet.c
+++ b/gnome-applets/gweather/gweather-applet.c
@@ -140,6 +140,10 @@ static void place_widgets (GWeatherApplet *gw_applet)
case GTK_ORIENTATION_HORIZONTAL:
horizontal = TRUE;
break;
+
+ default:
+ g_assert_not_reached ();
+ break;
}
/* Create the weather icon */
diff --git a/gnome-applets/gweather/gweather-pref.c b/gnome-applets/gweather/gweather-pref.c
index c530f8265..419359ef9 100644
--- a/gnome-applets/gweather/gweather-pref.c
+++ b/gnome-applets/gweather/gweather-pref.c
@@ -1023,6 +1023,10 @@ gweather_pref_set_property (GObject *object,
case PROP_GWEATHER_APPLET:
pref->applet = g_value_get_pointer (value);
break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -1038,6 +1042,10 @@ gweather_pref_get_property (GObject *object,
case PROP_GWEATHER_APPLET:
g_value_set_pointer (value, pref->applet);
break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/gnome-applets/gweather/gweather-xml.c b/gnome-applets/gweather/gweather-xml.c
index f732924f4..14e9a2991 100644
--- a/gnome-applets/gweather/gweather-xml.c
+++ b/gnome-applets/gweather/gweather-xml.c
@@ -127,6 +127,7 @@ gweather_xml_parse_node (GWeatherLocation *gloc,
break;
case GWEATHER_LOCATION_DETACHED:
+ default:
g_assert_not_reached ();
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]