From c853e75b3946dc1ed68792057c02d35d4ea0ea61 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 17 Nov 2013 23:52:15 +0100 Subject: [PATCH] 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, --- aac_afh.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; } -- 2.39.2