From: Andre Noll Date: Sun, 17 Nov 2013 22:52:15 +0000 (+0100) Subject: aac_afh: Fix clang warning. X-Git-Tag: v0.5.2~12^2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=c853e75b3946dc1ed68792057c02d35d4ea0ea61 aac_afh: Fix clang warning. Although gcc seems to have no problem with it, clang complains about illegal characters in string literals of aac_afh.c: aac_afh.c:114:25: warning: illegal character encoding in string literal [-Winvalid-source-encoding] if (!atom_cmp(type1, "ART")) ^~~~ aac_afh.c:116:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding] else if (!atom_cmp(type1, "alb")) ^~~~ aac_afh.c:118:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding] else if (!atom_cmp(type1, "nam")) ^~~~ aac_afh.c:120:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding] else if (!atom_cmp(type1, "cmt")) ^~~~ aac_afh.c:122:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding] else if (!atom_cmp(type1, "day")) This patch encodes the offending value as "\xa9" to make clang happy, --- diff --git a/aac_afh.c b/aac_afh.c index 2d04695a..1610cb2c 100644 --- a/aac_afh.c +++ b/aac_afh.c @@ -111,15 +111,15 @@ static void read_tags(unsigned char *buf, size_t buflen, struct afh_info *afhi) q = p + ret + ret2 + 8; if (q + size2 > buf + buflen) break; - if (!atom_cmp(type1, "©ART")) + if (!atom_cmp(type1, "\xa9" "ART")) afhi->tags.artist = get_tag(q, size2); - else if (!atom_cmp(type1, "©alb")) + else if (!atom_cmp(type1, "\xa9" "alb")) afhi->tags.album = get_tag(q, size2); - else if (!atom_cmp(type1, "©nam")) + else if (!atom_cmp(type1, "\xa9" "nam")) afhi->tags.title = get_tag(q, size2); - else if (!atom_cmp(type1, "©cmt")) + else if (!atom_cmp(type1, "\xa9" "cmt")) afhi->tags.comment = get_tag(q, size2); - else if (!atom_cmp(type1, "©day")) + else if (!atom_cmp(type1, "\xa9" "day")) afhi->tags.year = get_tag(q, size2); p += size1; }