From: Todd C. Miller Date: Sun, 6 Feb 2005 03:31:53 +0000 (+0000) Subject: __attribute__((__unused__)) doesn't work in gcc 2.7.2.1 so limit its X-Git-Tag: SUDO_1_7_0~724 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f0c64f67796f38b25ef9162f70b99dedfbe65ce;p=sudo __attribute__((__unused__)) doesn't work in gcc 2.7.2.1 so limit its use to gcc >= 2.8. --- diff --git a/compat.h b/compat.h index 0d1b1e068..f2cf8fb28 100644 --- a/compat.h +++ b/compat.h @@ -43,7 +43,11 @@ /* 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 /*