[vlc-commits] sap: silence signedness warnings

Zhao Zhili git at videolan.org
Fri May 18 13:27:44 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Fri May 18 14:00:54 2018 +0800| [b7b0199708783df3ecd93d193e09ac4359a7935a] | committer: Thomas Guillem

sap: silence signedness warnings

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7b0199708783df3ecd93d193e09ac4359a7935a
---

 src/stream_output/sap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/stream_output/sap.c b/src/stream_output/sap.c
index 2b5b0e13a2..e81bb00ec4 100644
--- a/src/stream_output/sap.c
+++ b/src/stream_output/sap.c
@@ -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;



More information about the vlc-commits mailing list