HomeFreeBSD

Fix gcc compiler warning, parse_option()

Description

Fix gcc compiler warning, parse_option()

When compiling ZFS in user space gcc-4.6.0 correctly identifies
the variable 'value' as being set but never used. This generates a
warning and a build failure when using --enable-debug. Once again
this is correct but I'm reluctant to remove 'value' because we are
breaking the string in to name/value pairs. While it is not used
now there's a good chance it will be soon and I'd rather not have
to reinvent this. To suppress the warning with just as a VERIFY().
This was observed under Fedora 15.

cmd/mount_zfs/mount_zfs.c: In function ‘parse_option’:
cmd/mount_zfs/mount_zfs.c:112:21: error: variable ‘value’ set but not
used [-Werror=unused-but-set-variable]

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Apr 18 2011, 11:44 PM
Parents
rG0fe3d820f5be: Fix gcc compiler warning, dsl_pool_create()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG03514b01109e: Fix gcc compiler warning, parse_option() (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Apr 19 2011, 4:04 PM