From 43da6eacd00efcb87ddbd92fc26f47139d490f77 Mon Sep 17 00:00:00 2001 From: Kurt Kartaltepe Date: Sun, 23 Aug 2020 12:04:39 -0700 Subject: [PATCH] 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 --- plugins/obs-filters/noise-suppress-filter.c | 2 ++ plugins/obs-outputs/librtmp/dh.h | 1 + plugins/obs-outputs/librtmp/handshake.h | 1 + 3 files changed, 4 insertions(+) diff --git a/plugins/obs-filters/noise-suppress-filter.c b/plugins/obs-filters/noise-suppress-filter.c index 3863fd152..883e49e8b 100644 --- a/plugins/obs-filters/noise-suppress-filter.c +++ b/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 } diff --git a/plugins/obs-outputs/librtmp/dh.h b/plugins/obs-outputs/librtmp/dh.h index a51d131ec..466b64e4a 100644 --- a/plugins/obs-outputs/librtmp/dh.h +++ b/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); diff --git a/plugins/obs-outputs/librtmp/handshake.h b/plugins/obs-outputs/librtmp/handshake.h index a90dede83..182786785 100644 --- a/plugins/obs-outputs/librtmp/handshake.h +++ b/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