summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2022-07-06 00:50:54 -0400
committerJean-Marc Valin <jmvalin@amazon.com>2022-07-06 00:50:54 -0400
commit50407983f2f785adf55a16797e1d42741dc1295b (patch)
treebc37c507813e8a26da2be966eaa2f2fce3ff9ced
parent4b8becdfc5df002701ea1dd97b37d424b12b519d (diff)
downloadopus-50407983f2f785adf55a16797e1d42741dc1295b.tar.gz
Fix warnings when compiling with FUZZING enabled
-rw-r--r--celt/rate.c2
-rw-r--r--src/opus_encoder.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/celt/rate.c b/celt/rate.c
index 465e1ba2..7f7ad3fa 100644
--- a/celt/rate.c
+++ b/celt/rate.c
@@ -356,6 +356,8 @@ static OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end,
else
depth_threshold = 0;
#ifdef FUZZING
+ (void)signalBandwidth;
+ (void)depth_threshold;
if ((rand()&0x1) == 0)
#else
if (codedBands<=start+2 || (band_bits > (depth_threshold*band_width<<LM<<BITRES)>>4 && j<=signalBandwidth))
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index 64b6726c..8c8db5a5 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1315,6 +1315,8 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
st->stream_channels = st->force_channels;
} else {
#ifdef FUZZING
+ (void)stereo_music_threshold;
+ (void)stereo_voice_threshold;
/* Random mono/stereo decision */
if (st->channels == 2 && (rand()&0x1F)==0)
st->stream_channels = 3-st->stream_channels;
@@ -1353,6 +1355,8 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
} else if (st->user_forced_mode == OPUS_AUTO)
{
#ifdef FUZZING
+ (void)stereo_width;
+ (void)mode_thresholds;
/* Random mode switching */
if ((rand()&0xF)==0)
{