Subject: Re: Compiler warning levels and sccsid/rcsid
To: None <current-users@NetBSD.ORG>
From: Christos Zoulas <>
List: current-users
Date: 07/27/1995 17:32:17
In article <> (Sakari Jalovaara) writes:
>>>char rcsid[] __attribute__ ((unused)) = "...";
>Rather than taint all code with non-portable constructs
>how about a script, say, "checkcc" with something like
>	cc -warnings -more-warnings $* 2>&1 | \
>	    egrep -v ": warning: `(rcsid|sccsid)' declared but not used$" |
>	    grep -v ": warning: any other annoying warnings here$'
>then simply "make CC=checkcc all".
>									++sja

The __attribute__ is the best fix IMHO.

One can easily use a #if !__GNUC__ to define it to nothing... The only
remaining problem is that one needs to include a file that has the
definition before using it as pointed out by jtc I think...