HomeFreeBSD

Fix gcc fortify source warnings

Description

Fix gcc fortify source warnings

Resolve issues uncovered by -D_FORTIFY_SOURCE=2, the default redhat
macro's file adds this option to the cflags. This causes warnings
of the following type designed to keep the developer honest:

warning: ignoring return value of 'foo', declared
         with attribute warn_unused_result

The short term fix is to wrap these calls in VERIFY() to check the
return code. The code was already assusing these would never fail.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Aug 26 2010, 4:52 PM
Parents
rGf709a82dc11f: Fix gcc useless debug warnings
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG0e5b68e0159e: Fix gcc fortify source warnings (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Aug 27 2010, 10:34 PM