1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/pcm-dvdenc: Mark unreachable default cases as unreachable

Fixes a Clang warning when asserts are disabled:
"variable 'quant' is used uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]"

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-10-03 14:49:59 +02:00
parent 7a27357636
commit fc520ccb07

View File

@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h" #include "libavutil/channel_layout.h"
#include "avcodec.h" #include "avcodec.h"
#include "bytestream.h" #include "bytestream.h"
@ -45,7 +46,7 @@ static av_cold int pcm_dvd_encode_init(AVCodecContext *avctx)
freq = 1; freq = 1;
break; break;
default: default:
av_assert1(0); av_unreachable("Already checked via CODEC_SAMPLERATES");
} }
switch (avctx->sample_fmt) { switch (avctx->sample_fmt) {
@ -58,7 +59,7 @@ static av_cold int pcm_dvd_encode_init(AVCodecContext *avctx)
quant = 2; quant = 2;
break; break;
default: default:
av_assert1(0); av_unreachable("Already checked via CODEC_SAMPLEFMTS");
} }
avctx->bits_per_coded_sample = 16 + quant * 4; avctx->bits_per_coded_sample = 16 + quant * 4;