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, "<A9>ART"))
^~~~
aac_afh.c:116:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>alb"))
^~~~
aac_afh.c:118:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>nam"))
^~~~
aac_afh.c:120:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>cmt"))
^~~~
aac_afh.c:122:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>day"))
This patch encodes the offending value as "\xa9" to make clang happy,
q = p + ret + ret2 + 8;
if (q + size2 > buf + buflen)
break;
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);
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);
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);
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);
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;
}
afhi->tags.year = get_tag(q, size2);
p += size1;
}