HomeFreeBSD

Fix gcc self-comparison warning

Description

Fix gcc self-comparison warning

As of gcc 6.1.1 20160621 (Red Hat 6.1.1-3) a self-comparison is
detected by gcc in metaslab_alloc(). Resolve the warning by passing
a physical size of 0 to BP_SET_BIRTH() as it done by other callers.

module/zfs/metaslab.c: In function ‘metaslab_alloc’:
module/zfs/metaslab.c:2575:184: error: self-comparison always evaluates
    to true [-Werror=tautological-compare]

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
Issue #4907

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jul 30 2016, 12:10 AM
Parents
rG5b1bc1a1d8ae: Set proper dependency for string replacement targets
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGefe7978d89f8: Fix gcc self-comparison warning (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Aug 2 2016, 8:14 PM