ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Sun Oct 3 14:49:59 2021 +0200| [fc520ccb07d5f59f2c6fca04275e7b7366f2a7d0] | committer: Andreas Rheinhardt
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.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc520ccb07d5f59f2c6fca04275e7b7366f2a7d0 --- libavcodec/pcm-dvdenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/pcm-dvdenc.c b/libavcodec/pcm-dvdenc.c index b1f01ee323..a740f0e381 100644 --- a/libavcodec/pcm-dvdenc.c +++ b/libavcodec/pcm-dvdenc.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/avassert.h" #include "libavutil/channel_layout.h" #include "avcodec.h" #include "bytestream.h" @@ -45,7 +46,7 @@ static av_cold int pcm_dvd_encode_init(AVCodecContext *avctx) freq = 1; break; default: - av_assert1(0); + av_unreachable("Already checked via CODEC_SAMPLERATES"); } switch (avctx->sample_fmt) { @@ -58,7 +59,7 @@ static av_cold int pcm_dvd_encode_init(AVCodecContext *avctx) quant = 2; break; default: - av_assert1(0); + av_unreachable("Already checked via CODEC_SAMPLEFMTS"); } avctx->bits_per_coded_sample = 16 + quant * 4; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".