aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-09-22 09:48:27 +0200
committerMax Kellermann <max@duempel.org>2012-09-22 09:48:27 +0200
commit04c02a1eb89f0ccc7984976afb708b675d494578 (patch)
tree42e94ad901104918523808554686e360cb70234e /src
parent41487426f5fb19c963e5f94e8c4f791637e2da03 (diff)
downloadmpd-04c02a1eb89f0ccc7984976afb708b675d494578.tar.gz
mpd-04c02a1eb89f0ccc7984976afb708b675d494578.tar.xz
mpd-04c02a1eb89f0ccc7984976afb708b675d494578.zip
locate: cast enum tag_type to int before comparing with integer
Avoids clang pickiness. This code is not correct, but we'll fix that another day.
Diffstat (limited to '')
-rw-r--r--src/locate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/locate.c b/src/locate.c
index 9645da9cd..c9684d2b6 100644
--- a/src/locate.c
+++ b/src/locate.c
@@ -127,7 +127,7 @@ locate_tag_search(const struct song *song, enum tag_type type, const char *str)
{
bool ret = false;
- if (type == LOCATE_TAG_FILE_TYPE || type == LOCATE_TAG_ANY_TYPE) {
+ if (type == LOCATE_TAG_FILE_TYPE || (int)type == LOCATE_TAG_ANY_TYPE) {
char *uri = song_get_uri(song);
char *p = g_utf8_casefold(uri, -1);
g_free(uri);
@@ -147,7 +147,7 @@ locate_tag_search(const struct song *song, enum tag_type type, const char *str)
for (unsigned i = 0; i < song->tag->num_items && !ret; i++) {
visited_types[song->tag->items[i]->type] = true;
- if (type != LOCATE_TAG_ANY_TYPE &&
+ if ((int)type != LOCATE_TAG_ANY_TYPE &&
song->tag->items[i]->type != type) {
continue;
}
@@ -185,7 +185,7 @@ locate_song_search(const struct song *song,
static bool
locate_tag_match(const struct song *song, enum tag_type type, const char *str)
{
- if (type == LOCATE_TAG_FILE_TYPE || type == LOCATE_TAG_ANY_TYPE) {
+ if (type == LOCATE_TAG_FILE_TYPE || (int)type == LOCATE_TAG_ANY_TYPE) {
char *uri = song_get_uri(song);
bool matches = strcmp(str, uri) == 0;
g_free(uri);
@@ -205,7 +205,7 @@ locate_tag_match(const struct song *song, enum tag_type type, const char *str)
for (unsigned i = 0; i < song->tag->num_items; i++) {
visited_types[song->tag->items[i]->type] = true;
- if (type != LOCATE_TAG_ANY_TYPE &&
+ if ((int)type != LOCATE_TAG_ANY_TYPE &&
song->tag->items[i]->type != type) {
continue;
}