On Mon, Nov 09, 2009 at 09:10:33PM +0100, Felix Zielcke wrote: > Am Montag, den 09.11.2009, 21:04 +0100 schrieb Robert Millan: > > On Tue, Nov 10, 2009 at 12:46:06AM +0800, Bean wrote: > > > Some system such as ubuntu karmic define write using > > > warn_unused_result attribute, which cause a warning when return > > value > > > of write is not used. As grub compile with -Werror, this turn into > > > error, to work around it, use something like this: > > > > > > ssize_t tmp = write(bcat, buf, 2048); > > > (void) tmp; > > > > Isn't "(void) write (bcat, buf, 2048)" enough? > > Why not just check the return code and print a warning (or maybe even > error) for tmp != 2048?
Of course... shame on us. A proper fix was so easy and we were still looking for the workaround :-) Thanks Felix. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel