Browse Source

obs-filters/obs-outputs: Cleanup unused var warns

Fix unused variables when compiling without rnnoise
Fix unused variable warnings in GCC when using assert() in release
Kurt Kartaltepe 5 years ago
parent
commit
43da6eacd0

+ 2 - 0
plugins/obs-filters/noise-suppress-filter.c

@@ -376,6 +376,8 @@ static inline void process_rnnoise(struct noise_suppress_data *ng)
 			}
 		}
 	}
+#else
+	UNUSED_PARAMETER(ng);
 #endif
 }
 

+ 1 - 0
plugins/obs-outputs/librtmp/dh.h

@@ -370,6 +370,7 @@ DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen,
 
     MP_gethex(q1, Q1024, len);
     assert(len);
+    UNUSED_PARAMETER(len); // Make GCC happy len is used in release.
 
     if (isValidPublicKey(pubkeyBn, dh->p, q1))
         res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh);

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

@@ -322,6 +322,7 @@ HMACsha256(const uint8_t *message, size_t messageLen, const uint8_t *key,
 #endif
 
     assert(digestLen == 32);
+    UNUSED_PARAMETER(digestLen); // Make GCC happy digestLen is used in release.
 }
 
 static void