summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2013-06-25 22:37:53 -0500
committerScott Balneaves <[email protected]>2013-06-25 22:37:53 -0500
commit1ac0fec2c683c2ecbf569d9b2b96c1334a821d20 (patch)
tree7eb15ec80fdc25a5e2b2082bb6aaa864f1e57229
parent0afa4372e2cce0f757b31d0b4a2ee626d9517055 (diff)
downloadlibmateweather-1ac0fec2c683c2ecbf569d9b2b96c1334a821d20.tar.bz2
libmateweather-1ac0fec2c683c2ecbf569d9b2b96c1334a821d20.tar.xz
Proper default handling in switch statement
-rw-r--r--libmateweather/mateweather-prefs.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libmateweather/mateweather-prefs.c b/libmateweather/mateweather-prefs.c
index 84ac379..384a761 100644
--- a/libmateweather/mateweather-prefs.c
+++ b/libmateweather/mateweather-prefs.c
@@ -95,8 +95,9 @@ mateweather_prefs_get_temp_display_name (TempUnit temp)
case TEMP_UNIT_FAHRENHEIT:
/* translators: Fahrenheit */
return N_("F");
+ default:
+ return N_("Invalid");
}
- return N_("Invalid");
}
const char *
@@ -120,8 +121,9 @@ mateweather_prefs_get_speed_display_name (SpeedUnit speed)
case SPEED_UNIT_BFT:
/* translators: wind speed */
return N_("Beaufort scale");
+ default:
+ return N_("Invalid");
}
- return N_("Invalid");
}
const char *
@@ -148,8 +150,9 @@ mateweather_prefs_get_pressure_display_name (PressureUnit pressure)
case PRESSURE_UNIT_ATM:
/* translators: atmosphere */
return N_("atm");
+ default:
+ return N_("Invalid");
}
- return N_("Invalid");
}
const char *
@@ -167,6 +170,7 @@ mateweather_prefs_get_distance_display_name (DistanceUnit distance)
case DISTANCE_UNIT_MILES:
/* translators: miles */
return N_("mi");
+ default:
+ return N_("Invalid");
}
- return N_("Invalid");
}