summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-01-28 19:33:27 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-12 22:46:21 +0100
commitadb0cfc24c17f35067cb9aa58c2fae1392872091 (patch)
treefbc1cc4565cca6c68f160a8e5b384ecbe61ab6ad
parentad0a4eaf8dede47a971eaa1a2b3b3bd3debbcf6c (diff)
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 <thiago.macieira@intel.com>
-rw-r--r--src/corelib/global/qcompilerdetection.h4
1 files changed, 4 insertions, 0 deletions
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)"