Skip to content
Snippets Groups Projects
Unverified Commit 50407983 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Fix warnings when compiling with FUZZING enabled

parent 4b8becdf
No related branches found
No related tags found
No related merge requests found
Pipeline #3223 passed
...@@ -356,6 +356,8 @@ static OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end, ...@@ -356,6 +356,8 @@ static OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end,
else else
depth_threshold = 0; depth_threshold = 0;
#ifdef FUZZING #ifdef FUZZING
(void)signalBandwidth;
(void)depth_threshold;
if ((rand()&0x1) == 0) if ((rand()&0x1) == 0)
#else #else
if (codedBands<=start+2 || (band_bits > (depth_threshold*band_width<<LM<<BITRES)>>4 && j<=signalBandwidth)) if (codedBands<=start+2 || (band_bits > (depth_threshold*band_width<<LM<<BITRES)>>4 && j<=signalBandwidth))
......
...@@ -1315,6 +1315,8 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ ...@@ -1315,6 +1315,8 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
st->stream_channels = st->force_channels; st->stream_channels = st->force_channels;
} else { } else {
#ifdef FUZZING #ifdef FUZZING
(void)stereo_music_threshold;
(void)stereo_voice_threshold;
/* Random mono/stereo decision */ /* Random mono/stereo decision */
if (st->channels == 2 && (rand()&0x1F)==0) if (st->channels == 2 && (rand()&0x1F)==0)
st->stream_channels = 3-st->stream_channels; st->stream_channels = 3-st->stream_channels;
...@@ -1353,6 +1355,8 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ ...@@ -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) } else if (st->user_forced_mode == OPUS_AUTO)
{ {
#ifdef FUZZING #ifdef FUZZING
(void)stereo_width;
(void)mode_thresholds;
/* Random mode switching */ /* Random mode switching */
if ((rand()&0xF)==0) if ((rand()&0xF)==0)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment