[sound-juicer] Fix comparison of signed and unsigned integers
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer] Fix comparison of signed and unsigned integers
- Date: Mon, 10 Oct 2016 10:35:13 +0000 (UTC)
commit 187dcc28e0da35dfee6c0d6e820093f262c3e1f6
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Fri Oct 7 18:57:15 2016 +0100
Fix comparison of signed and unsigned integers
Use the same type for both sides of the comparison.
Found with -Wsign-compare.
libjuicer/rb-gst-media-types.c | 2 +-
libjuicer/sj-metadata-musicbrainz5.c | 8 ++++----
libjuicer/sj-metadata.c | 2 +-
src/sj-main.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libjuicer/rb-gst-media-types.c b/libjuicer/rb-gst-media-types.c
index 6a73aad..b8ab009 100644
--- a/libjuicer/rb-gst-media-types.c
+++ b/libjuicer/rb-gst-media-types.c
@@ -247,7 +247,7 @@ rb_gst_get_encoding_profile (const char *media_type)
gboolean
rb_gst_media_type_is_lossless (const char *media_type)
{
- int i;
+ gsize i;
const char *lossless_types[] = {
"audio/x-flac",
"audio/x-alac",
diff --git a/libjuicer/sj-metadata-musicbrainz5.c b/libjuicer/sj-metadata-musicbrainz5.c
index c96dfb8..64581c5 100644
--- a/libjuicer/sj-metadata-musicbrainz5.c
+++ b/libjuicer/sj-metadata-musicbrainz5.c
@@ -415,7 +415,7 @@ get_artist_list (SjMetadataMusicbrainz5 *self,
{
Mb5NameCreditList name_list;
GList *artists;
- unsigned int i;
+ int i;
char buffer[512]; /* for the GET macro */
if (credit == NULL)
@@ -574,7 +574,7 @@ static void relationlist_list_foreach_relation(SjMetadataMusicbrainz5 *self,
RelationForeachFunc callback,
gpointer user_data)
{
- unsigned int j;
+ int j;
if (relation_lists == NULL)
return;
@@ -582,7 +582,7 @@ static void relationlist_list_foreach_relation(SjMetadataMusicbrainz5 *self,
for (j = 0; j < mb5_relationlist_list_size (relation_lists); j++) {
Mb5RelationList relations;
char type[512]; /* To hold relationlist target-type and relation type */
- unsigned int i;
+ int i;
relations = mb5_relationlist_list_item (relation_lists, j);
if (relations == NULL)
@@ -872,7 +872,7 @@ fill_tracks_from_medium (SjMetadataMusicbrainz5 *self,
{
Mb5TrackList track_list;
GList *tracks;
- unsigned int i;
+ int i;
gboolean skip_data_tracks;
char buffer[512]; /* for the GET() macro */
diff --git a/libjuicer/sj-metadata.c b/libjuicer/sj-metadata.c
index c3621d9..51bb387 100644
--- a/libjuicer/sj-metadata.c
+++ b/libjuicer/sj-metadata.c
@@ -362,7 +362,7 @@ char *
sj_metadata_helper_lookup_country_code (const char *code)
{
const char *country_name;
- int len, i;
+ gsize len, i;
/* Musicbrainz uses some additional codes on top of ISO-3166 so
treat those as a special case if we don't get a match from the
iso-codes data */
diff --git a/src/sj-main.c b/src/sj-main.c
index 729f197..209ffac 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -509,7 +509,7 @@ composer_show_hide (const char* genre)
static char *genres[COUNT]; /* store localized genre names */
static gboolean init = FALSE; /* TRUE if localized genre names initalized*/
gboolean composer_show = FALSE;
- int i;
+ gsize i;
GList* l;
char *folded_genre;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]