]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
It is used, gcc is a liar.
authorDale Weiler <killfieldengine@gmail.com>
Wed, 30 Jan 2013 06:14:35 +0000 (06:14 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Wed, 30 Jan 2013 06:14:35 +0000 (06:14 +0000)
gmqcc.h

diff --git a/gmqcc.h b/gmqcc.h
index dd5dbc7f9d75369afbf04e7b6db0b8172530aa38..ab585d5143bb70b9f73e09af01905ce64a02ba97 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -102,8 +102,10 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \
  */
 #if defined(__GNUC__) || defined(__CLANG__)
 #   define GMQCC_WARN __attribute__((warn_unused_result))
+#   define GMQCC_USED __attribute__((used))
 #else
 #   define GMQCC_WARN
+#   define GMQCC_USED
 #endif
 /*
  * This is a hack to silent clang regarding empty
@@ -1133,7 +1135,7 @@ enum {
 };
 
 
-static const char *opts_options_descriptions[] = {
+GMQCC_USED static const char *opts_options_descriptions[] = {
 #   define GMQCC_TYPE_OPTIONS
 #   define GMQCC_DEFINE_FLAG(X, Y) Y,
 #   include "opts.def"