[vlc-devel] [PATCH] securetransport: fix warning

Alexandre Janniaux ajanni at videolabs.io
Fri Jul 17 12:28:16 CEST 2020


../../../modules/misc/securetransport.c:763:68: warning: values of type 'OSStatus' should not be used as format arguments; add an
      explicit cast to 'int' instead [-Wformat]
                msg_Err(crd, "failed setting ALPN protocols (%i)", ret);
                                                             ~~    ^~~
                                                             %i    (int)
../../../include/vlc_messages.h:102:38: note: expanded from macro 'msg_Err'
    msg_Generic(p_this, VLC_MSG_ERR, __VA_ARGS__)
                                     ^~~~~~~~~~~
../../../include/vlc_messages.h:98:30: note: expanded from macro 'msg_Generic'
                   __func__, __VA_ARGS__)
                             ^~~~~~~~~~~
---
 modules/misc/securetransport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/misc/securetransport.c b/modules/misc/securetransport.c
index 3b14f0399a4..228b8129b7a 100644
--- a/modules/misc/securetransport.c
+++ b/modules/misc/securetransport.c
@@ -760,7 +760,7 @@ static vlc_tls_t *st_ClientSessionOpen(vlc_tls_client_t *crd, vlc_tls_t *sock,
 
             OSStatus ret = SSLSetALPNProtocols(sys->p_context, alpnValues);
             if (ret != noErr){
-                msg_Err(crd, "failed setting ALPN protocols (%i)", ret);
+                msg_Err(crd, "failed setting ALPN protocols (%i)", (int)ret);
             }
             CFRelease(alpnValues);
         } else {
-- 
2.27.0



More information about the vlc-devel mailing list