Hollis Blanchard <[EMAIL PROTECTED]> writes:
>> int
>> grub_foo (int x, unused int foo)
>> {
>> ...
>> }
>
> I believe gcc attributes can't be used as naturally as this; it would
> have to be "int unused foo" or "int unused *foo" (from memory).
[EMAIL PROTECTED]:~/tmp/t5 $ gcc -Dunused= -Wall -Wunused-parameter -O2 -c t1.c
t1.c: In function 'foo':
t1.c:6: warning: unused parameter 'x'
t1.c:6: warning: unused parameter 'baz'
[EMAIL PROTECTED]:~/tmp/t5 $ gcc -Wall -Wunused-parameter -O2 -c t1.c
t1.c: In function 'foo':
t1.c:6: warning: unused parameter 'x'
[EMAIL PROTECTED]:~/tmp/t5 $ cat t1.c
#ifndef unused
# define unused __attribute__((unused))
#endif
int
foo (int x, unused int baz)
{
return 0;
}
~j
pgpRZgCTKgf01.pgp
Description: PGP signature
_______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
