diff --git a/src/webp/types.h b/src/webp/types.h index 9c17edec..a0363f1c 100644 --- a/src/webp/types.h +++ b/src/webp/types.h @@ -38,11 +38,11 @@ typedef long long int int64_t; #ifndef WEBP_NODISCARD #if defined(WEBP_ENABLE_NODISCARD) && WEBP_ENABLE_NODISCARD -#if (defined(__cplusplus) && __cplusplus >= 201700L) || \ +#if (defined(__cplusplus) && __cplusplus >= 201703L) || \ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) #define WEBP_NODISCARD [[nodiscard]] #else -// gcc's __has_attribute does not work for enums. +// gcc's __attribute__((warn_unused_result)) does not work for enums. #if defined(__clang__) && defined(__has_attribute) #if __has_attribute(warn_unused_result) #define WEBP_NODISCARD __attribute__((warn_unused_result))