mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
clear -Wextra-semi-stmt warnings
This is available with clang. Clears warnings of the form: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] As a side-effect it also clear a few -Wpedantic warnings with gcc: warning: ISO C does not allow extra ';' outside of a function [-Wpedantic] Change-Id: I9295c767aad475c68b1fbbdff855b0d6650a25f5
This commit is contained in:
@ -66,14 +66,16 @@ void WebPMuxDelete(WebPMux* mux) {
|
||||
|
||||
// Handy MACRO, makes MuxSet() very symmetric to MuxGet().
|
||||
#define SWITCH_ID_LIST(INDEX, LIST) \
|
||||
if (idx == (INDEX)) { \
|
||||
err = ChunkAssignData(&chunk, data, copy_data, tag); \
|
||||
if (err == WEBP_MUX_OK) { \
|
||||
err = ChunkSetHead(&chunk, (LIST)); \
|
||||
if (err != WEBP_MUX_OK) ChunkRelease(&chunk); \
|
||||
do { \
|
||||
if (idx == (INDEX)) { \
|
||||
err = ChunkAssignData(&chunk, data, copy_data, tag); \
|
||||
if (err == WEBP_MUX_OK) { \
|
||||
err = ChunkSetHead(&chunk, (LIST)); \
|
||||
if (err != WEBP_MUX_OK) ChunkRelease(&chunk); \
|
||||
} \
|
||||
return err; \
|
||||
} \
|
||||
return err; \
|
||||
}
|
||||
} while (0)
|
||||
|
||||
static WebPMuxError MuxSet(WebPMux* const mux, uint32_t tag,
|
||||
const WebPData* const data, int copy_data) {
|
||||
|
@ -21,16 +21,18 @@
|
||||
|
||||
// Handy MACRO.
|
||||
#define SWITCH_ID_LIST(INDEX, LIST) \
|
||||
if (idx == (INDEX)) { \
|
||||
const WebPChunk* const chunk = ChunkSearchList((LIST), nth, \
|
||||
kChunks[(INDEX)].tag); \
|
||||
if (chunk) { \
|
||||
*data = chunk->data_; \
|
||||
return WEBP_MUX_OK; \
|
||||
} else { \
|
||||
return WEBP_MUX_NOT_FOUND; \
|
||||
do { \
|
||||
if (idx == (INDEX)) { \
|
||||
const WebPChunk* const chunk = ChunkSearchList((LIST), nth, \
|
||||
kChunks[(INDEX)].tag); \
|
||||
if (chunk) { \
|
||||
*data = chunk->data_; \
|
||||
return WEBP_MUX_OK; \
|
||||
} else { \
|
||||
return WEBP_MUX_NOT_FOUND; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
} while (0)
|
||||
|
||||
static WebPMuxError MuxGet(const WebPMux* const mux, CHUNK_INDEX idx,
|
||||
uint32_t nth, WebPData* const data) {
|
||||
|
Reference in New Issue
Block a user