From e4ebf5d0a71d521c4c0a0c55f67dc0d9baea403a Mon Sep 17 00:00:00 2001 From: miod Date: Thu, 23 Oct 2025 18:53:08 +0000 Subject: [PATCH] Revert previous (r1.5) now that all platforms support __attribute__((warn_unused_result)). --- lib/libcbor/src/cbor/common.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/libcbor/src/cbor/common.h b/lib/libcbor/src/cbor/common.h index 410ef24d517..6a6f969f23f 100644 --- a/lib/libcbor/src/cbor/common.h +++ b/lib/libcbor/src/cbor/common.h @@ -83,11 +83,7 @@ extern bool _cbor_enable_assert; #define _CBOR_UNUSED(x) __attribute__((__unused__)) x // TODO(https://github.com/PJK/libcbor/issues/247): Prefer [[nodiscard]] if // available -#if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ >= 4) #define _CBOR_NODISCARD __attribute__((warn_unused_result)) -#else /* gcc3 can not treat warn_unused_result attribute */ -#define _CBOR_NODISCARD -#endif #elif defined(_MSC_VER) #define _CBOR_UNUSED(x) __pragma(warning(suppress : 4100 4101)) x #define _CBOR_NODISCARD