[giggle] Fix some compiler warnings



commit fc2b4aad766c783f597f2cc817de61e8eddd1a67
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Oct 19 01:51:45 2010 +0200

    Fix some compiler warnings

 libgiggle-git/giggle-git-blame.c  |   14 +++++++-------
 libgiggle-git/giggle-git-config.c |    2 +-
 libgiggle/giggle-plugin.c         |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/libgiggle-git/giggle-git-blame.c b/libgiggle-git/giggle-git-blame.c
index d189f23..666e879 100644
--- a/libgiggle-git/giggle-git-blame.c
+++ b/libgiggle-git/giggle-git-blame.c
@@ -170,7 +170,7 @@ git_blame_handle_output (GiggleJob   *job,
 	GiggleAuthor        *author = NULL;
 	GiggleAuthor        *committer = NULL;
 	char                 sha[41];
-	time_t               time;
+	time_t               author_time;
 	int                  i;
 
 	priv = GET_PRIV (job);
@@ -212,8 +212,8 @@ git_blame_handle_output (GiggleJob   *job,
 			g_object_unref (committer);
 			g_free (name);
 		} else if (1 == sscanf (start, "author-time %d\n", &i)) {
-			struct tm *date = g_new (struct tm, 1); time = i;
-			giggle_revision_set_date (chunk->revision, gmtime_r (&time, date));
+			struct tm *date = g_new (struct tm, 1); author_time = i;
+			giggle_revision_set_date (chunk->revision, gmtime_r (&author_time, date));
 		} else if (g_str_has_prefix (start, "summary ")) {
 			char *summary = g_strndup (start + 8, end - start - 8);
 			giggle_revision_set_short_log (chunk->revision, summary);
@@ -287,17 +287,17 @@ giggle_git_blame_new (GiggleRevision *revision,
 
 const GiggleGitBlameChunk *
 giggle_git_blame_get_chunk (GiggleGitBlame *blame,
-			    int             index)
+			    gint            idx)
 {
 	GiggleGitBlamePriv *priv;
 
 	g_return_val_if_fail (GIGGLE_IS_GIT_BLAME (blame), NULL);
-	g_return_val_if_fail (index >= 0, NULL);
+	g_return_val_if_fail (idx >= 0, NULL);
 
 	priv = GET_PRIV (blame);
 
-	if (index < priv->chunks->len)
-		return priv->chunks->pdata[index];
+	if ((guint) idx < priv->chunks->len)
+		return priv->chunks->pdata[idx];
 
 	return NULL;
 }
diff --git a/libgiggle-git/giggle-git-config.c b/libgiggle-git/giggle-git-config.c
index 3578ef8..acd82d8 100644
--- a/libgiggle-git/giggle-git-config.c
+++ b/libgiggle-git/giggle-git-config.c
@@ -415,7 +415,7 @@ git_config_read_cb (GiggleGit *git,
 static gboolean
 GIT_CONFIG_is_global (const char *key)
 {
-	int i;
+	guint i;
 
 	for (i = 0; i < G_N_ELEMENTS (fields); ++i) {
 		if (!strcmp (key, fields[i].name))
diff --git a/libgiggle/giggle-plugin.c b/libgiggle/giggle-plugin.c
index c214696..1c43e75 100644
--- a/libgiggle/giggle-plugin.c
+++ b/libgiggle/giggle-plugin.c
@@ -621,7 +621,7 @@ giggle_plugin_merge_ui (GigglePlugin *plugin,
 			GError      **error)
 {
 	GigglePluginPriv *priv = GET_PRIV (plugin);
-	int               i;
+	guint             i;
 
 	g_return_val_if_fail (GIGGLE_IS_PLUGIN (plugin), 0);
 	g_return_val_if_fail (GTK_IS_UI_MANAGER (ui), 0);



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