]> granicus.if.org Git - sudo/commitdiff
__attribute__((__unused__)) doesn't work in gcc 2.7.2.1 so limit its
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 6 Feb 2005 03:31:53 +0000 (03:31 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 6 Feb 2005 03:31:53 +0000 (03:31 +0000)
use to gcc >= 2.8.

compat.h

index 0d1b1e0686b2d2503f407e775c78b1bebafe6c22..f2cf8fb283ef47cc2e297ab40d3dc084a44508db 100644 (file)
--- a/compat.h
+++ b/compat.h
 
 /* For silencing gcc warnings about rcsids */
 #ifndef __unused
-# define __unused      __attribute__((__unused__))
+# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 7)
+#  define __unused     __attribute__((__unused__))
+# else
+#  define __unused
+# endif
 #endif
 
 /*