[glib] gmacros: add G_GNUC_UNUSED to G_STATIC_ASSERT
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gmacros: add G_GNUC_UNUSED to G_STATIC_ASSERT
- Date: Wed, 30 Jan 2013 17:01:29 +0000 (UTC)
commit 0ea7abaed5cff685f4d825f13588979e5dcb8e5b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jan 30 17:59:09 2013 +0100
gmacros: add G_GNUC_UNUSED to G_STATIC_ASSERT
Silence some warnings seen with GCC 4.8.
glib/gmacros.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/gmacros.h b/glib/gmacros.h
index b07eba7..7c21717 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -159,9 +159,9 @@
#define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
#define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
#ifdef __COUNTER__
-#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
+#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
#else
-#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __LINE__)[(expr) ? 1 : -1]
+#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __LINE__)[(expr) ? 1 : -1] G_GNUC_UNUSED
#endif
#define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1]))
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]