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);
|
||||
switch (num_args) {
|
||||
case 1:
|
||||
info->x_offset = info->y_offset = 0; // fall through
|
||||
info->x_offset = info->y_offset = 0;
|
||||
WEBP_FALLTHROUGH;
|
||||
// fall through
|
||||
case 3:
|
||||
dispose_method = 0; // fall through
|
||||
dispose_method = 0;
|
||||
WEBP_FALLTHROUGH;
|
||||
// fall through
|
||||
case 4:
|
||||
plus_minus = '+';
|
||||
blend_method = 'b'; // fall through
|
||||
blend_method = 'b';
|
||||
WEBP_FALLTHROUGH;
|
||||
// fall through
|
||||
case 6:
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -71,6 +71,15 @@ typedef long long int int64_t;
|
||||
#endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
||||
#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)
|
||||
#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user