diff --git a/image/FrameAnimator.cpp b/image/FrameAnimator.cpp index f1d8faea740..df12787f764 100644 --- a/image/FrameAnimator.cpp +++ b/image/FrameAnimator.cpp @@ -439,7 +439,7 @@ FrameAnimator::DoBlend(nsIntRect* aDirtyRect, // Calculate area that needs updating switch (prevFrameData.mDisposalMethod) { default: - MOZ_ASSERT_UNREACHABLE("Unexpected DisposalMethod"); + MOZ_FALLTHROUGH_ASSERT("Unexpected DisposalMethod"); case DisposalMethod::NOT_SPECIFIED: case DisposalMethod::KEEP: *aDirtyRect = nextFrameData.mRect; @@ -573,7 +573,7 @@ FrameAnimator::DoBlend(nsIntRect* aDirtyRect, break; default: - MOZ_ASSERT_UNREACHABLE("Unexpected DisposalMethod"); + MOZ_FALLTHROUGH_ASSERT("Unexpected DisposalMethod"); case DisposalMethod::NOT_SPECIFIED: case DisposalMethod::KEEP: // Copy previous frame into compositingFrame before we put the new diff --git a/image/decoders/nsGIFDecoder2.cpp b/image/decoders/nsGIFDecoder2.cpp index b100a08d554..91de60156b0 100644 --- a/image/decoders/nsGIFDecoder2.cpp +++ b/image/decoders/nsGIFDecoder2.cpp @@ -1145,8 +1145,7 @@ nsGIFDecoder2::WriteInternal(const char* aBuffer, uint32_t aCount) mGIFStruct.state = gif_error; return; } - - // FALL THROUGH + MOZ_FALLTHROUGH; // to continue decoding header. } case gif_image_header_continue: { diff --git a/image/decoders/nsJPEGDecoder.cpp b/image/decoders/nsJPEGDecoder.cpp index d8fdc255817..56c35505e7c 100644 --- a/image/decoders/nsJPEGDecoder.cpp +++ b/image/decoders/nsJPEGDecoder.cpp @@ -397,6 +397,7 @@ nsJPEGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) mInfo.output_width, mInfo.output_height)); mState = JPEG_START_DECOMPRESS; + MOZ_FALLTHROUGH; // to start decompressing. } case JPEG_START_DECOMPRESS: { @@ -423,6 +424,7 @@ nsJPEGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) // If this is a progressive JPEG ... mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; + MOZ_FALLTHROUGH; // to decompress sequential JPEG. } case JPEG_DECOMPRESS_SEQUENTIAL: { @@ -444,6 +446,7 @@ nsJPEGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) "We didn't process all of the data!"); mState = JPEG_DONE; } + MOZ_FALLTHROUGH; // to decompress progressive JPEG. } case JPEG_DECOMPRESS_PROGRESSIVE: { @@ -516,6 +519,7 @@ nsJPEGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) mState = JPEG_DONE; } + MOZ_FALLTHROUGH; // to finish decompressing. } case JPEG_DONE: {