From adb0cfc24c17f35067cb9aa58c2fae1392872091 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 28 Jan 2013 19:33:27 -0800 Subject: Add Q_DECL_UNUSED, marking functions or variables unused It's similar to Q_UNUSED, but this is to be added in the declaration Change-Id: I2f664129fb1f34f7913ef371d45c2c0fec958174 Reviewed-by: Thiago Macieira --- src/corelib/global/qcompilerdetection.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index d062ea0d15..a4af8b8899 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -179,6 +179,7 @@ # define Q_TYPEOF(expr) __typeof__(expr) # define Q_DECL_DEPRECATED __attribute__ ((__deprecated__)) # define Q_DECL_ALIGN(n) __attribute__((__aligned__(n))) +# define Q_DECL_UNUSED __attribute__((__unused__)) # define Q_LIKELY(expr) __builtin_expect(!!(expr), true) # define Q_UNLIKELY(expr) __builtin_expect(!!(expr), false) # define Q_NORETURN __attribute__((__noreturn__)) @@ -816,6 +817,9 @@ #ifndef Q_DECL_HIDDEN # define Q_DECL_HIDDEN #endif +#ifndef Q_DECL_UNUSED +# define Q_DECL_UNUSED +#endif #ifndef Q_FUNC_INFO # if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) # define Q_FUNC_INFO __FILE__ "(line number unavailable)" -- cgit v1.2.3