[ovs-dev] [PATCH] Clean-up some compiler warnings about ignoring return values

Justin Pettit jpettit at nicira.com
Tue Dec 15 08:17:40 UTC 2009


Thanks.  I pushed it as discussed.  There are a few others that are not mentioned here that you may want to double-check.

--Justin


On Dec 14, 2009, at 9:22 PM, Ben Pfaff wrote:

> Justin Pettit <jpettit at nicira.com> writes:
> 
>> I'm sure it will work.  I don't really have a preference for
>> how we handle them.  I'll go ahead and change them with your
>> method.  
> 
> Thank you.
> 
>> Should we do the same with the read() and write() warnings as
>> well?  Here are a few example of them:
> 
>> lib/process.c: In function ‘process_exited’:
>> lib/process.c:292: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result
>> lib/process.c: In function ‘sigchld_handler’:
>> lib/process.c:620: warning: ignoring return value of ‘write’, declared with attribute war
> 
> These two can definitely be ignored.
> 
>> lib/signals.c: In function ‘signal_poll’:
>> lib/signals.c:101: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result
>> lib/signals.c: In function ‘signal_handler’:
>> lib/signals.c:125: warning: ignoring return value of ‘write’, declared with attribute war
> 
> Ditto for these two.
> 
>> tests/test-vconn.c: In function ‘test_send_hello’:
>> tests/test-vconn.c:227: warning: ignoring return value of ‘write’, declared with attribute warn_unused
> 
> I'd change this one to "assert(write(fd, out, out_size) ==
> out_size);".





More information about the dev mailing list