Merge branch 'refs/heads/t/clang_warning_fixes'
authorAndre Noll <maan@systemlinux.org>
Thu, 13 Feb 2014 07:36:03 +0000 (08:36 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 13 Feb 2014 08:02:00 +0000 (09:02 +0100)
Was cooking since 2014-01-14.

1b9e28 command.c: Silence clang warning.
994e72 udp_recv: Fix clang warning.
c853e7 aac_afh: Fix clang warning.

NEWS
aac_afh.c
command.c
udp_recv.c

diff --git a/NEWS b/NEWS
index 51d9db7..c3cf479 100644 (file)
--- 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"
 ------------------------------------------
index 2d04695..1610cb2 100644 (file)
--- 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;
        }
index 3d40023..8c74665 100644 (file)
--- 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);
 }
 
index 436b298..1648cad 100644 (file)
@@ -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;