[giggle] Fix some compiler warnings



commit 773ec1f3d4ea7861c0722354d289818d6d8b7550
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Mar 9 17:46:49 2010 +0100

    Fix some compiler warnings

 libgiggle/giggle-remote.c |   14 ++++++++++----
 src/giggle-view-diff.c    |    2 +-
 src/giggle-view-file.c    |    3 ++-
 3 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/libgiggle/giggle-remote.c b/libgiggle/giggle-remote.c
index a3d091a..423420d 100644
--- a/libgiggle/giggle-remote.c
+++ b/libgiggle/giggle-remote.c
@@ -140,10 +140,13 @@ remote_get_icon_name (GiggleRemotePriv *priv)
 		return "giggle-scm-svn";
 
 	case GIGGLE_REMOTE_MECHANISM_INVALID:
+		g_return_val_if_reached (NULL);
 		break;
-	}
 
-	g_return_val_if_reached (NULL);
+	default:
+		g_return_val_if_reached (NULL);
+		break;
+	}
 }
 
 static void
@@ -281,10 +284,13 @@ remote_get_config_prefix (GiggleRemoteMechanism mechanism)
 		return "svn-remote.";
 
 	case GIGGLE_REMOTE_MECHANISM_INVALID:
+		g_return_val_if_reached (NULL);
 		break;
-	}
 
-	g_return_val_if_reached (NULL);
+	default:
+		g_return_val_if_reached (NULL);
+		break;
+	}
 }
 
 void
diff --git a/src/giggle-view-diff.c b/src/giggle-view-diff.c
index 696df69..9412403 100644
--- a/src/giggle-view-diff.c
+++ b/src/giggle-view-diff.c
@@ -162,7 +162,7 @@ static void
 view_diff_add_ui (GiggleView   *view,
 		  GtkUIManager *manager)
 {
-	const static char layout[] =
+	static const char layout[] =
 		"<ui>"
 		"  <menubar name='MainMenubar'>"
 		"    <menu action='GoMenu'>"
diff --git a/src/giggle-view-file.c b/src/giggle-view-file.c
index 6aa07d0..6983fa7 100644
--- a/src/giggle-view-file.c
+++ b/src/giggle-view-file.c
@@ -310,7 +310,7 @@ static void
 view_file_add_ui (GiggleView   *view,
 		  GtkUIManager *manager)
 {
-	const static char layout[] =
+	static const char layout[] =
 		"<ui>"
 		"  <menubar name='MainMenubar'>"
 		"    <menu action='GoMenu'>"
@@ -687,6 +687,7 @@ show_error (GiggleViewFile *view,
 					 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 					 GTK_MESSAGE_ERROR,
 					 GTK_BUTTONS_OK,
+	                                 "%s: %s",
 					 message, error->message);
 
 	gtk_dialog_run (GTK_DIALOG (dialog));



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