mirror of
https://github.com/webmproject/libwebp.git
synced 2026-04-09 14:22:31 +02:00
Replace [[fallthrough]] with WEBP_FALLTHROUGH
C and C++ version values based on https://en.cppreference.com/w/c/23.html and https://en.cppreference.com/w/cpp/preprocessor/replace. Change-Id: I1059fa9e17f25f05d452f8dd003ca7d421742bf7
This commit is contained in:
@@ -493,12 +493,18 @@ static int ParseFrameArgs(const char* args, WebPMuxFrameInfo* const info) {
|
|||||||
&plus_minus, &blend_method, &unused);
|
&plus_minus, &blend_method, &unused);
|
||||||
switch (num_args) {
|
switch (num_args) {
|
||||||
case 1:
|
case 1:
|
||||||
info->x_offset = info->y_offset = 0; // fall through
|
info->x_offset = info->y_offset = 0;
|
||||||
|
WEBP_FALLTHROUGH;
|
||||||
|
// fall through
|
||||||
case 3:
|
case 3:
|
||||||
dispose_method = 0; // fall through
|
dispose_method = 0;
|
||||||
|
WEBP_FALLTHROUGH;
|
||||||
|
// fall through
|
||||||
case 4:
|
case 4:
|
||||||
plus_minus = '+';
|
plus_minus = '+';
|
||||||
blend_method = 'b'; // fall through
|
blend_method = 'b';
|
||||||
|
WEBP_FALLTHROUGH;
|
||||||
|
// fall through
|
||||||
case 6:
|
case 6:
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
@@ -71,6 +71,15 @@ typedef long long int int64_t;
|
|||||||
#endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
#endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
||||||
#endif /* WEBP_EXTERN */
|
#endif /* WEBP_EXTERN */
|
||||||
|
|
||||||
|
#ifndef WEBP_FALLTHROUGH
|
||||||
|
#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
|
||||||
|
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
|
||||||
|
#define WEBP_FALLTHROUGH [[fallthrough]]
|
||||||
|
#else
|
||||||
|
#define WEBP_FALLTHROUGH
|
||||||
|
#endif
|
||||||
|
#endif /* WEBP_FALLTHROUGH */
|
||||||
|
|
||||||
// Macro to check ABI compatibility (same major revision number)
|
// Macro to check ABI compatibility (same major revision number)
|
||||||
#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
|
#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user