ソースを参照

obs-outputs: Fix a few warnings in librtmp

jp9000 9 年 前
コミット
867c58472e

+ 7 - 0
plugins/obs-outputs/librtmp/handshake.h

@@ -198,6 +198,8 @@ GetDigestOffset2(uint8_t *handshake, unsigned int len)
                  __FUNCTION__, res);
         exit(1);
     }
+
+    (void)len;
     return res;
 }
 
@@ -764,7 +766,9 @@ HandShake(RTMP * r, int FP9HandShake)
     RC4_handle keyIn = 0;
     RC4_handle keyOut = 0;
 
+#ifndef _DEBUG
     int32_t *ip;
+#endif
     uint32_t uptime;
 
     uint8_t clientbuf[RTMP_SIG_SIZE + 4], *clientsig=clientbuf+4;
@@ -1139,7 +1143,10 @@ SHandShake(RTMP * r)
     RC4_handle keyOut = 0;
     int FP9HandShake = FALSE;
     int encrypted;
+
+#ifndef _DEBUG
     int32_t *ip;
+#endif
 
     uint8_t clientsig[RTMP_SIG_SIZE];
     uint8_t serverbuf[RTMP_SIG_SIZE + 4], *serversig = serverbuf+4;

+ 3 - 1
plugins/obs-outputs/librtmp/rtmp.c

@@ -1384,7 +1384,7 @@ WriteN(RTMP *r, const char *buffer, int n)
 
     if (r->Link.rc4keyOut)
     {
-        if (n > sizeof(buf))
+        if (n > (int)sizeof(buf))
             encrypted = (char *)malloc(n);
         else
             encrypted = (char *)buf;
@@ -2344,6 +2344,8 @@ AV_clear(RTMP_METHOD *vals, int num)
 static int
 b64enc(const unsigned char *input, int length, char *output, int maxsize)
 {
+    (void)maxsize;
+
 #ifdef USE_POLARSSL
     size_t buf_size = maxsize;
     if(base64_encode((unsigned char *) output, &buf_size, input, length) == 0)