mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-10 02:46:47 +02:00
remove some unreachable break statements
following a goto. + enable -Wunreachable-code-aggressive if available Change-Id: I0312800d84d8984dbc51925600ed5d7d438413fd
This commit is contained in:
parent
3700ffd7e1
commit
411d3677ca
@ -80,6 +80,7 @@ TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wparentheses-equality])
|
|||||||
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wshadow])
|
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wshadow])
|
||||||
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wshorten-64-to-32])
|
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wshorten-64-to-32])
|
||||||
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wundef])
|
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wundef])
|
||||||
|
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunreachable-code-aggressive])
|
||||||
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunreachable-code])
|
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunreachable-code])
|
||||||
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunused-but-set-variable])
|
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunused-but-set-variable])
|
||||||
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunused])
|
TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunused])
|
||||||
|
@ -947,7 +947,6 @@ static WEBP_INLINE void CopyBlock8b(uint8_t* const dst, int dist, int length) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto Copy;
|
goto Copy;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
CopySmallPattern8b(src, dst, length, pattern);
|
CopySmallPattern8b(src, dst, length, pattern);
|
||||||
return;
|
return;
|
||||||
|
@ -155,7 +155,6 @@ static int MuxImageParse(const WebPChunk* const chunk, int copy_data,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto Fail;
|
goto Fail;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
subchunk_size = ChunkDiskSize(&subchunk);
|
subchunk_size = ChunkDiskSize(&subchunk);
|
||||||
bytes += subchunk_size;
|
bytes += subchunk_size;
|
||||||
@ -264,7 +263,6 @@ WebPMux* WebPMuxCreateInternal(const WebPData* bitstream, int copy_data,
|
|||||||
if (!MuxImageParse(&chunk, copy_data, wpi)) goto Err;
|
if (!MuxImageParse(&chunk, copy_data, wpi)) goto Err;
|
||||||
ChunkRelease(&chunk);
|
ChunkRelease(&chunk);
|
||||||
goto PushImage;
|
goto PushImage;
|
||||||
break;
|
|
||||||
default: // A non-image chunk.
|
default: // A non-image chunk.
|
||||||
if (wpi->is_partial_) goto Err; // Encountered a non-image chunk before
|
if (wpi->is_partial_) goto Err; // Encountered a non-image chunk before
|
||||||
// getting all chunks of an image.
|
// getting all chunks of an image.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user