From 64134e60b348bb1686986e217f4020d6d108ed46 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Fri, 19 Oct 2018 16:37:31 +0200 Subject: Add FDK_FALLTHROUGH macro to prevent implicit-fallthrough compiler warnings Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I9f9064fb63ac40e18f245c00b7375b4874f2925b --- libAACenc/src/aacenc_lib.cpp | 3 +++ libAACenc/src/bitenc.cpp | 2 ++ 2 files changed, 5 insertions(+) (limited to 'libAACenc/src') diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp index f92cff4..9e0630c 100644 --- a/libAACenc/src/aacenc_lib.cpp +++ b/libAACenc/src/aacenc_lib.cpp @@ -907,6 +907,7 @@ static AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder, case AOT_MP2_AAC_LC: case AOT_MP2_SBR: hAacConfig->usePns = 0; + FDK_FALLTHROUGH; case AOT_AAC_LC: case AOT_SBR: case AOT_PS: @@ -2091,12 +2092,14 @@ AACENC_ERROR aacEncoder_SetParam(const HANDLE_AACENCODER hAacEncoder, err = AACENC_INVALID_CONFIG; goto bail; } + FDK_FALLTHROUGH; case AOT_SBR: case AOT_MP2_SBR: if (!(hAacEncoder->encoder_modis & (ENC_MODE_FLAG_SBR))) { err = AACENC_INVALID_CONFIG; goto bail; } + FDK_FALLTHROUGH; case AOT_AAC_LC: case AOT_MP2_AAC_LC: case AOT_ER_AAC_LD: diff --git a/libAACenc/src/bitenc.cpp b/libAACenc/src/bitenc.cpp index 652d1fd..957e821 100644 --- a/libAACenc/src/bitenc.cpp +++ b/libAACenc/src/bitenc.cpp @@ -643,6 +643,7 @@ static INT FDKaacEnc_writeExtensionPayload(HANDLE_FDK_BITSTREAM hBitStream, FDKwriteBits(hBitStream, *extPayloadData++, 4); /* nibble */ } extBitsUsed += 4; + FDK_FALLTHROUGH; case EXT_DYNAMIC_RANGE: case EXT_SBR_DATA: case EXT_SBR_DATA_CRC: @@ -690,6 +691,7 @@ static INT FDKaacEnc_writeExtensionPayload(HANDLE_FDK_BITSTREAM hBitStream, case EXT_FILL_DATA: fillByte = 0xA5; + FDK_FALLTHROUGH; case EXT_FIL: default: if (hBitStream != NULL) { -- cgit v1.2.3