On Thu, Sep 17, 2009 at 03:33:24PM +0100, Richard W.M. Jones wrote:
This caused me to waste about 3 hours looking for a non-existent "data
corrupter" bug, which turned out to be the result of not checking the
return value of xread ...
You might want to add
__attribute__((__warn_unused_result__))
to the header file decl of xread/xwrite so that the compiler will
warn if any other code areas forget to check the return error code
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|