[geocode-glib] geocode-place: Fix -Wswitch-enum warnings
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] geocode-place: Fix -Wswitch-enum warnings
- Date: Fri, 13 Jan 2017 23:12:03 +0000 (UTC)
commit b088742ae986b2591542a167250a760376245516
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Oct 13 13:20:20 2016 +0100
geocode-place: Fix -Wswitch-enum warnings
This switch is not meant to handle all of the values for the switch
(omissions are not a bug), so cast the value to an int to disable type
checking first.
https://bugzilla.gnome.org/show_bug.cgi?id=756311
geocode-glib/geocode-place.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/geocode-glib/geocode-place.c b/geocode-glib/geocode-place.c
index 99d287a..3b11cad 100644
--- a/geocode-glib/geocode-place.c
+++ b/geocode-glib/geocode-place.c
@@ -1127,7 +1127,7 @@ get_icon_name (GeocodePlace *place)
{
const char *icon_name;
- switch (place->priv->place_type) {
+ switch ((int) place->priv->place_type) {
case GEOCODE_PLACE_TYPE_BUILDING:
icon_name = "poi-building";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]