summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2024-12-26 21:43:13 +0000
committerDavid Kalnischkies <david@kalnischkies.de>2025-01-05 22:16:08 +0000
commit3977dd98d30e40986f883fe03370d673eb616442 (patch)
tree72e1327db64ebf0eb7d2cc02bf9f044ee33b11e6
parent785a7a50b53bd0794e58cca31730818714992c00 (diff)
Drop usage of APT_UNUSED
-rw-r--r--apt-pkg/contrib/error.h2
-rw-r--r--apt-pkg/contrib/macros.h4
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<F>;
#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