[libgdata] [build] gcc warning fixes



commit 5b570c019d4e5c9335b681427687a65cd8f650e3
Author: Philip Withnall <philip tecnocode co uk>
Date:   Fri Jul 16 09:40:34 2010 +0100

    [build] gcc warning fixes

 gdata/services/youtube/gdata-youtube-category.c |   12 +++++++-----
 gdata/tests/general.c                           |    2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gdata/services/youtube/gdata-youtube-category.c b/gdata/services/youtube/gdata-youtube-category.c
index 6aba857..f405c8f 100644
--- a/gdata/services/youtube/gdata-youtube-category.c
+++ b/gdata/services/youtube/gdata-youtube-category.c
@@ -208,14 +208,16 @@ gdata_youtube_category_is_assignable (GDataYouTubeCategory *self)
 gboolean
 gdata_youtube_category_is_browsable (GDataYouTubeCategory *self, const gchar *region)
 {
-	const gchar **i;
-
 	g_return_val_if_fail (GDATA_IS_YOUTUBE_CATEGORY (self), FALSE);
 	g_return_val_if_fail (region != NULL && *region != '\0', FALSE);
 
-	for (i = self->priv->browsable_regions; i != NULL && *i != NULL; i++) {
-		if (strcmp (*i, region) == 0)
-			return TRUE;
+	if (self->priv->browsable_regions != NULL) {
+		guint i;
+
+		for (i = 0; self->priv->browsable_regions[i] != NULL; i++) {
+			if (strcmp (self->priv->browsable_regions[i], region) == 0)
+				return TRUE;
+		}
 	}
 
 	return FALSE;
diff --git a/gdata/tests/general.c b/gdata/tests/general.c
index e3a3e35..8e27f42 100644
--- a/gdata/tests/general.c
+++ b/gdata/tests/general.c
@@ -802,7 +802,7 @@ test_access_rule_get_xml (void)
 	g_free (scope_value3);
 
 	/* Test that the GDataAccessRule:role and GDataEntry:title properties are linked */
-	gdata_entry_set_title (rule, "Another role");
+	gdata_entry_set_title (GDATA_ENTRY (rule), "Another role");
 	g_assert_cmpstr (gdata_access_rule_get_role (rule), ==, "Another role");
 	gdata_access_rule_set_role (rule, GDATA_ACCESS_ROLE_NONE);
 	g_assert_cmpstr (gdata_entry_get_title (GDATA_ENTRY (rule)), ==, "none");



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