<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 13, 2012, at 12:08 PM, <a href="mailto:openbios-request@openbios.org">openbios-request@openbios.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Message: 1<br>Date: Sun, 05 Aug 2012 17:20:49 -0400<br>From: Tarl Neustaedter <<a href="mailto:tarl-b2@tarl.net">tarl-b2@tarl.net</a>><br>To: The OpenBIOS Mailinglist <<a href="mailto:openbios@openbios.org">openbios@openbios.org</a>><br>Subject: Re: [OpenBIOS] Bug in file unix.c<br>Message-ID: <<a href="mailto:501EE3B1.6090407@tarl.net">501EE3B1.6090407@tarl.net</a>><br>Content-Type: text/plain; charset=windows-1252; format=flowed<br><br>On 2012-Aug-5 15:36 , Programmingkid wrote:<br><blockquote type="cite">I was trying to build openbios on Ubuntu 10.10 when I received this error message:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">CC    target/arch/unix/unix.o<br></blockquote><blockquote type="cite">cc1: warnings being treated as errors<br></blockquote><blockquote type="cite">../arch/unix/unix.c: In function ?read_from_disk?:<br></blockquote><blockquote type="cite">../arch/unix/unix.c:382: error: ignoring return value of ?read?, declared with attribute warn_unused_result<br></blockquote><blockquote type="cite">make[1]: *** [target/arch/unix/unix.o] Error 1<br></blockquote><blockquote type="cite">make[1]: Leaving directory `/home/user/Desktop/openbios-devel/obj-x86'<br></blockquote><blockquote type="cite">make: *** [build-verbose] Error 1<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is the command I used to build openbios:<br></blockquote><blockquote type="cite">./config/scripts/switch-arch unix-x86<br></blockquote><br>That looks like your version of the C compiler has the ultra-pedantic<span class="Apple-converted-space"> </span><br>errors turned on.<br><br>Ignoring the return value for a function that returns one is (or at<span class="Apple-converted-space"> </span><br>least used to be) legal C. Some recent compilers have decided to make it<span class="Apple-converted-space"> </span><br>a fatal error. The fix is to place (void) in front of the particular<span class="Apple-converted-space"> </span><br>invocation, to signal that yes, you know it returns a value, you've<span class="Apple-converted-space"> </span><br>thought about it carefully, and you don't give a crap what the value is,<span class="Apple-converted-space"> </span><br>and you still want to call this function without paying attention to the<span class="Apple-converted-space"> </span><br>return value.<br><br>As you may have gathered, I'm not a fan of this particular error check.<span class="Apple-converted-space"> </span><br>It ends up cluttering code with lots of irrelevant casting. Since I<span class="Apple-converted-space"> </span><br>regard casting as an indication of code weakness, adding piles of<span class="Apple-converted-space"> </span><br>irrelevant casts (in my opinion) makes the code weaker - because it's<span class="Apple-converted-space"> </span><br>harder to focus on the areas which actually are weak.</span></blockquote><br></div><div>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. </div><br></body></html>