From 3977dd98d30e40986f883fe03370d673eb616442 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 26 Dec 2024 21:43:13 +0000 Subject: Drop usage of APT_UNUSED --- apt-pkg/contrib/error.h | 2 +- apt-pkg/contrib/macros.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index 792232010..f61b44b87 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -367,6 +367,6 @@ private: /*{{{*/ APT_PUBLIC GlobalError *_GetErrorObj(); static struct { inline GlobalError* operator ->() { return _GetErrorObj(); } -} _error APT_UNUSED; +} _error [[maybe_unused]]; #endif diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h index 66437f305..eeac81d31 100644 --- a/apt-pkg/contrib/macros.h +++ b/apt-pkg/contrib/macros.h @@ -40,12 +40,10 @@ #define APT_PURE __attribute__((pure)) #define APT_PRINTF(n) __attribute__((format(printf, n, n + 1))) #define APT_WEAK __attribute__((weak)); - #define APT_UNUSED __attribute__((unused)) #else #define APT_PURE #define APT_PRINTF(n) #define APT_WEAK - #define APT_UNUSED #endif #if APT_GCC_VERSION > 0x0302 @@ -134,10 +132,12 @@ AptScopeWrapper(F) -> AptScopeWrapper; #define APT_DEPRECATED __attribute__ ((deprecated)) #define APT_DEPRECATED_MSG(X) __attribute__ ((deprecated(X))) #define APT_NORETURN __attribute__((noreturn)) + #define APT_UNUSED __attribute__((unused)) #else #define APT_DEPRECATED #define APT_DEPRECATED_MSG(X) #define APT_NORETURN + #define APT_UNUSED #endif #endif #endif -- cgit v1.2.3-70-g09d2