From 348243ddf641024144e543b8cd5343a35fad8ca5 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 27 Apr 2012 12:35:59 +0200 Subject: [PATCH] GMQCC_WARN macro --- gmqcc.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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