mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-01 22:44:13 +08:00
mdbx: refine/fix MDBX_MAYBE_UNUSED
for modern GCC 11.x and C20.
This commit is contained in:
parent
76b9cb5dcc
commit
23e11e3a57
3
mdbx.h
3
mdbx.h
@ -454,7 +454,8 @@ typedef mode_t mdbx_mode_t;
|
||||
#endif
|
||||
#endif /* MDBX_PRINTF_ARGS */
|
||||
|
||||
#if defined(DOXYGEN) || __has_cpp_attribute(maybe_unused)
|
||||
#if defined(DOXYGEN) || (__has_cpp_attribute(maybe_unused) && \
|
||||
(defined(__cplusplus) || __STDC_VERSION__ > 202005L))
|
||||
#define MDBX_MAYBE_UNUSED [[maybe_unused]]
|
||||
#elif defined(__GNUC__) || __has_attribute(__unused__)
|
||||
#define MDBX_MAYBE_UNUSED __attribute__((__unused__))
|
||||
|
Loading…
x
Reference in New Issue
Block a user