From: Andre Noll Date: Thu, 13 Feb 2014 07:36:03 +0000 (+0100) Subject: Merge branch 'refs/heads/t/clang_warning_fixes' X-Git-Tag: v0.5.2~12 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=e6e3a404091110ac770f65dad64e194f5900cd27;hp=ccd2581a1d421d05be9d621c9d85eff90d390d20 Merge branch 'refs/heads/t/clang_warning_fixes' Was cooking since 2014-01-14. 1b9e28 command.c: Silence clang warning. 994e72 udp_recv: Fix clang warning. c853e7 aac_afh: Fix clang warning. --- diff --git a/NEWS b/NEWS index 51d9db7c..c3cf479a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,12 @@ NEWS ==== +--------------------------------- +0.5.2 (???) "orthogonal interior" +--------------------------------- + + - Minor fixes to avoid clang warnings. + ------------------------------------------ 0.5.1 (2013-12-20) "temporary implication" ------------------------------------------ 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; } diff --git a/command.c b/command.c index 3d40023f..8c746652 100644 --- a/command.c +++ b/command.c @@ -554,6 +554,7 @@ static int send_list_of_commands(struct command_context *cc, struct server_comma msg = para_strcat(msg, tmp); free(tmp); } + assert(msg); return send_sb(&cc->scc, msg, strlen(msg), SBD_OUTPUT, false); } diff --git a/udp_recv.c b/udp_recv.c index 436b298c..1648cad8 100644 --- a/udp_recv.c +++ b/udp_recv.c @@ -43,7 +43,7 @@ static int udp_check_eof(size_t sz, struct iovec iov[2]) } if (memcmp(iov[0].iov_base, FEC_EOF_PACKET, iov[0].iov_len) != 0) return 0; - if (memcmp(iov[1].iov_base, FEC_EOF_PACKET + iov[0].iov_len, + if (memcmp(iov[1].iov_base, &FEC_EOF_PACKET[iov[0].iov_len], FEC_EOF_PACKET_LEN - iov[0].iov_len) != 0) return 0; return -E_RECV_EOF;