From: Wolfgang (Blub) Bumiller Date: Fri, 27 Apr 2012 10:35:59 +0000 (+0200) Subject: GMQCC_WARN macro X-Git-Tag: 0.1-rc1~585 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=348243ddf641024144e543b8cd5343a35fad8ca5;p=xonotic%2Fgmqcc.git GMQCC_WARN macro --- diff --git a/gmqcc.h b/gmqcc.h index e16b495..09311cc 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -58,6 +58,17 @@ # endif # endif /* !__cplusplus */ +/* + * Of some functions which are generated we want to make sure + * that the result isn't ignored. To find such function calls, + * we use this macro. + */ +#if defined(__GNUC__) || defined(__CLANG__) +# define GMQCC_WARN __attribute__((warn_unused_result)) +#else +# define GMQCC_WARN +#endif + /* * stdint.h and inttypes.h -less subset * for systems that don't have it, which we must