gnome-games r8646 - trunk/libgames-support



Author: chpe
Date: Tue Feb  3 18:47:38 2009
New Revision: 8646
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8646&view=rev

Log:
-Wswitch-default and -Wswitch-enum fixes.

Modified:
   trunk/libgames-support/games-card-images.c
   trunk/libgames-support/games-card-theme.c
   trunk/libgames-support/games-conf.c
   trunk/libgames-support/games-dlg-players.c
   trunk/libgames-support/games-frame.c
   trunk/libgames-support/games-runtime.c
   trunk/libgames-support/games-scores-backend.c

Modified: trunk/libgames-support/games-card-images.c
==============================================================================
--- trunk/libgames-support/games-card-images.c	(original)
+++ trunk/libgames-support/games-card-images.c	Tue Feb  3 18:47:38 2009
@@ -256,9 +256,13 @@
   GamesCardImages *images = GAMES_CARD_IMAGES (object);
 
   switch (prop_id) {
-  case PROP_THEME:
-    games_card_images_set_theme (images, g_value_get_object (value));
-    break;
+    case PROP_THEME:
+      games_card_images_set_theme (images, g_value_get_object (value));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
   }
 }
 
@@ -271,9 +275,13 @@
   GamesCardImages *images = GAMES_CARD_IMAGES (object);
 
   switch (prop_id) {
-  case PROP_THEME:
-    g_value_set_object (value, games_card_images_get_theme (images));
-    break;
+    case PROP_THEME:
+      g_value_set_object (value, games_card_images_get_theme (images));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
   }
 }
 

Modified: trunk/libgames-support/games-card-theme.c
==============================================================================
--- trunk/libgames-support/games-card-theme.c	(original)
+++ trunk/libgames-support/games-card-theme.c	Tue Feb  3 18:47:38 2009
@@ -97,6 +97,10 @@
     case PROP_THEME_INFO:
       theme->theme_info = g_value_dup_boxed (value);
       break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
   }
 }
 

Modified: trunk/libgames-support/games-conf.c
==============================================================================
--- trunk/libgames-support/games-conf.c	(original)
+++ trunk/libgames-support/games-conf.c	Tue Feb  3 18:47:38 2009
@@ -509,6 +509,10 @@
     case PROP_GAME_NAME:
       priv->game_name = g_value_dup_string (value);
       break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
   }
 }
 

Modified: trunk/libgames-support/games-dlg-players.c
==============================================================================
--- trunk/libgames-support/games-dlg-players.c	(original)
+++ trunk/libgames-support/games-dlg-players.c	Tue Feb  3 18:47:38 2009
@@ -139,6 +139,8 @@
       status = _("-");
       name = seat.name;
       break;
+    default:
+      g_assert_not_reached ();
     }
 
     gtk_list_store_set (store, &iter,

Modified: trunk/libgames-support/games-frame.c
==============================================================================
--- trunk/libgames-support/games-frame.c	(original)
+++ trunk/libgames-support/games-frame.c	Tue Feb  3 18:47:38 2009
@@ -94,6 +94,10 @@
     case PROP_LABEL:
       games_frame_set_label (frame, g_value_get_string (value));
       break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
   }
 }
 

Modified: trunk/libgames-support/games-runtime.c
==============================================================================
--- trunk/libgames-support/games-runtime.c	(original)
+++ trunk/libgames-support/games-runtime.c	Tue Feb  3 18:47:38 2009
@@ -172,7 +172,7 @@
   if (cached_directories[directory])
     return cached_directories[directory];
 
-  switch (directory) {
+  switch ((int) directory) {
 #ifndef G_OS_WIN32
     case GAMES_RUNTIME_DATA_DIRECTORY:
       path = g_strdup (DATADIR);

Modified: trunk/libgames-support/games-scores-backend.c
==============================================================================
--- trunk/libgames-support/games-scores-backend.c	(original)
+++ trunk/libgames-support/games-scores-backend.c	Tue Feb  3 18:47:38 2009
@@ -236,6 +236,8 @@
       case GAMES_SCORES_STYLE_TIME_ASCENDING:
 	newscore->value.time_double = g_ascii_strtod (scorestr, NULL);
 	break;
+      default:
+        g_assert_not_reached ();
       }
       self->scores_list = g_list_append (self->scores_list, newscore);
       /* Setup again for the next time around. */
@@ -282,6 +284,8 @@
     case GAMES_SCORES_STYLE_TIME_ASCENDING:
       rscore = d->value.time_double;
       break;
+    default:
+      g_assert_not_reached ();
     }
     rtime = d->time;
     rname = d->name;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]