[patch] ld: optimize vfinfo output slightly

Mike Frysinger vapier@gentoo.org
Fri Mar 30 17:20:00 GMT 2012


On Friday 30 March 2012 12:16:52 nick clifton wrote:
> >> Write errors should either be handled or ignored, but aborting is not
> >> the right thing (it's not an internal error).
> > 
> > so just do something like the following ?
> > 
> > 	if (fwrite (str, 1, len, fp) != len)
> > 	
> > 	  {
> > 	  
> > 	    /* Ignore.  */
> > 	  
> > 	  }
> 
> Yes.  Although it would be simpler to just remove the whole if (...)
> statment block and just call fwrite without testing its return value.
> 
> A patch modified in this way is approved.

the reason i didn't do that is it causes warnings since fwrite() is marked as 
"warn on unused result"
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20120330/0051f370/attachment.sig>


More information about the Binutils mailing list