From: David Schleef Date: Sun, 10 Jul 2011 02:35:27 +0000 (-0700) Subject: Move ORC_GNUC_UNUSED to orcutils.h and use it X-Git-Tag: orc-0.4.15~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d505fd74d137ec1d971537f11011c04f7b6dc3d1;p=platform%2Fupstream%2Forc.git Move ORC_GNUC_UNUSED to orcutils.h and use it --- diff --git a/orc-test/orctest.c b/orc-test/orctest.c index 71c701f..a847765 100644 --- a/orc-test/orctest.c +++ b/orc-test/orctest.c @@ -21,12 +21,6 @@ #define MIN_NONDENORMAL (1.1754944909521339405e-38) -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#define ORC_GNUC_UNUSED __attribute__((__unused__)) -#else -#define ORC_GNUC_UNUSED -#endif - void _orc_profile_init(void); OrcRandomContext rand_context; diff --git a/orc/orcparse.c b/orc/orcparse.c index ae61867..83fb987 100644 --- a/orc/orcparse.c +++ b/orc/orcparse.c @@ -285,8 +285,9 @@ orc_parse_full (const char *code, OrcProgram ***programs, char **log) for(i=offset+1;iprogram, 0, token[i], token[i]); diff --git a/orc/orcutils.h b/orc/orcutils.h index f627f1b..9df479d 100644 --- a/orc/orcutils.h +++ b/orc/orcutils.h @@ -148,6 +148,12 @@ typedef unsigned int orc_bool; #define ORC_GNU_PRINTF(a,b) #endif +#if ORC_GNUC_PREREQ(2,4) +#define ORC_GNUC_UNUSED __attribute__((__unused__)) +#else +#define ORC_GNUC_UNUSED +#endif + #ifdef __cplusplus #define ORC_BEGIN_DECLS extern "C" { #define ORC_END_DECLS }