Re: __unused

2006-11-03 Thread Hollis Blanchard
On Wed, 2006-11-01 at 13:48 +0100, Johan Rydberg wrote: > Hollis Blanchard <[EMAIL PROTECTED]> writes: > > > --- grub2-cvs.orig/include/grub/types.h 2006-10-31 19:06:47.0 > > -0600 > > +++ grub2-cvs/include/grub/types.h 2006-10-31 19:06:58.0 -0600 > > @@ -23,6 +23,8 @@ > > #

grub_read_file with len==0

2006-11-03 Thread Hollis Blanchard
grub_read_file() has this in it: if (len == 0 || len > file->size - file->offset) len = file->size - file->offset; This is a curious divergence from read(2), and bit me when loading an ELF segment with 0 p_filesz but non-0 p_memsz. Could we remove it? Why is it there in th

Re: __unused

2006-11-03 Thread Johan Rydberg
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 -Dunuse