Permalink
Browse files

Suppress false 'unused argument' warnings for GCC v3

* cord/cordxtra.c (CORD_ATTR_UNUSED): Use 'unused' attribute starting
from GCC v3.4 (instead of v4.0).
* include/private/gc_priv.h (GC_ATTR_UNUSED): Likewise.
  • Loading branch information...
ivmai committed Feb 27, 2012
1 parent e3bfd10 commit da8cf493af4e355e8f4bf1344d49407f4176fdc6
Showing with 2 additions and 2 deletions.
  1. +1 −1 cord/cordxtra.c
  2. +1 −1 include/private/gc_priv.h
View
@@ -63,7 +63,7 @@ typedef void (* oom_fn)(void);
ABORT("Out of memory\n"); }
# define ABORT(msg) { fprintf(stderr, "%s\n", msg); abort(); }
-#if __GNUC__ >= 4
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# define CORD_ATTR_UNUSED __attribute__((__unused__))
#else
# define CORD_ATTR_UNUSED /* empty */
@@ -130,7 +130,7 @@ typedef char * ptr_t; /* A generic pointer to which we can add */
#endif
#ifndef GC_ATTR_UNUSED
-# if __GNUC__ >= 4
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# define GC_ATTR_UNUSED __attribute__((__unused__))
# else
# define GC_ATTR_UNUSED /* empty */

0 comments on commit da8cf49

Please sign in to comment.