[OpenBIOS] Bug in file unix.c
programmingkidx at gmail.com
Mon Aug 13 20:16:29 CEST 2012
On Aug 13, 2012, at 12:08 PM, openbios-request at openbios.org wrote:
> Message: 1
> Date: Sun, 05 Aug 2012 17:20:49 -0400
> From: Tarl Neustaedter <tarl-b2 at tarl.net>
> To: The OpenBIOS Mailinglist <openbios at openbios.org>
> Subject: Re: [OpenBIOS] Bug in file unix.c
> Message-ID: <501EE3B1.6090407 at tarl.net>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> On 2012-Aug-5 15:36 , Programmingkid wrote:
>> I was trying to build openbios on Ubuntu 10.10 when I received this error message:
>> CC target/arch/unix/unix.o
>> cc1: warnings being treated as errors
>> ../arch/unix/unix.c: In function ?read_from_disk?:
>> ../arch/unix/unix.c:382: error: ignoring return value of ?read?, declared with attribute warn_unused_result
>> make: *** [target/arch/unix/unix.o] Error 1
>> make: Leaving directory `/home/user/Desktop/openbios-devel/obj-x86'
>> make: *** [build-verbose] Error 1
>> This is the command I used to build openbios:
>> ./config/scripts/switch-arch unix-x86
> That looks like your version of the C compiler has the ultra-pedantic
> errors turned on.
> Ignoring the return value for a function that returns one is (or at
> least used to be) legal C. Some recent compilers have decided to make it
> a fatal error. The fix is to place (void) in front of the particular
> invocation, to signal that yes, you know it returns a value, you've
> thought about it carefully, and you don't give a crap what the value is,
> and you still want to call this function without paying attention to the
> return value.
> As you may have gathered, I'm not a fan of this particular error check.
> It ends up cluttering code with lots of irrelevant casting. Since I
> regard casting as an indication of code weakness, adding piles of
> irrelevant casts (in my opinion) makes the code weaker - because it's
> harder to focus on the areas which actually are weak.
Still, this issue should be fixed. It does sound easy to fix and would make things a lot easier for anyone else who needed to build OpenBIOS on Ubuntu.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenBIOS