sap: silence signedness warnings
authorZhao Zhili <quinkblack@foxmail.com>
Fri, 18 May 2018 06:00:54 +0000 (14:00 +0800)
committerThomas Guillem <thomas@gllm.fr>
Fri, 18 May 2018 11:27:38 +0000 (13:27 +0200)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
src/stream_output/sap.c

index 2b5b0e1..e81bb00 100644 (file)
@@ -192,13 +192,13 @@ sout_AnnounceRegisterSDP (vlc_object_t *obj, const char *sdp,
 
     if (vlc_getaddrinfo (dst, 0, NULL, &res) == 0)
     {
-        if (res->ai_addrlen <= sizeof (addr))
+        if ((size_t)res->ai_addrlen <= sizeof (addr))
             memcpy (&addr, res->ai_addr, res->ai_addrlen);
         addrlen = res->ai_addrlen;
         freeaddrinfo (res);
     }
 
-    if (addrlen == 0 || addrlen > sizeof (addr))
+    if (addrlen == 0 || (size_t)addrlen > sizeof (addr))
     {
         msg_Err (obj, "No/invalid address specified for SAP announce" );
         return NULL;