Skip to content

Commit

Permalink
Suppress false 'unused argument' warnings for GCC v3
Browse files Browse the repository at this point in the history
* 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 da8cf49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cord/cordxtra.c
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion include/private/gc_priv.h
Expand Up @@ -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 */
Expand Down

0 comments on commit da8cf49

Please sign in to comment.