[giggle] Fix some compilation warnings
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [giggle] Fix some compilation warnings
- Date: Sun, 2 May 2010 20:13:13 +0000 (UTC)
commit 9fd7dbc4ca22086c4b63d3026031c749248f9f55
Author: Javier Jardón <jjardon gnome org>
Date: Sun May 2 22:05:12 2010 +0200
Fix some compilation warnings
libgiggle-git/giggle-git.c | 4 ++--
src/giggle-window.c | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/libgiggle-git/giggle-git.c b/libgiggle-git/giggle-git.c
index fc5e186..88dc2b4 100644
--- a/libgiggle-git/giggle-git.c
+++ b/libgiggle-git/giggle-git.c
@@ -262,7 +262,7 @@ git_verify_directory (const gchar *directory,
GError **error)
{
/* Do some funky stuff to verify that it's a valid GIT repo */
- gchar *argv[] = { GIT_COMMAND, "rev-parse", "--git-dir", NULL };
+ const gchar *argv[] = { GIT_COMMAND, "rev-parse", "--git-dir", NULL };
gchar *std_out = NULL;
gchar *std_err = NULL;
gint exit_code = 0;
@@ -273,7 +273,7 @@ git_verify_directory (const gchar *directory,
*git_dir = NULL;
}
- g_spawn_sync (directory, argv, NULL,
+ g_spawn_sync (directory, (gchar **) argv, NULL,
0, NULL, NULL,
&std_out, &std_err,
&exit_code, &local_error);
diff --git a/src/giggle-window.c b/src/giggle-window.c
index b5d15c6..d3695f5 100644
--- a/src/giggle-window.c
+++ b/src/giggle-window.c
@@ -1595,7 +1595,7 @@ window_directory_changed_cb (GiggleGit *git,
static void
window_recent_repositories_add (GiggleWindow *window)
{
- static gchar *groups[] = { PACKAGE, NULL };
+ static const gchar *groups[] = { PACKAGE, NULL };
GiggleWindowPriv *priv;
GtkRecentData data = { 0, };
const gchar *repository;
@@ -1612,8 +1612,8 @@ window_recent_repositories_add (GiggleWindow *window)
g_return_if_fail (repository != NULL);
data.display_name = (gchar *) giggle_git_get_project_name (priv->git);
- data.groups = groups;
- data.mime_type = "x-directory/normal";
+ data.groups = (gchar **) groups;
+ data.mime_type = g_strdup ("x-directory/normal");
data.app_name = (gchar *) g_get_application_name ();
data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
@@ -1621,6 +1621,7 @@ window_recent_repositories_add (GiggleWindow *window)
gtk_recent_manager_add_full (priv->recent_manager,
tmp_string, &data);
g_free (tmp_string);
+ g_free (data.mime_type);
g_free (data.app_exec);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]