Fix gcc compiler warning, dsl_pool_create()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 18 Apr 2011 23:27:45 +0000 (16:27 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 19 Apr 2011 16:04:51 +0000 (09:04 -0700)
commit0fe3d820f5be0cc5733f08aa4a57093c7b8febe6
tree757aab38e7bf436b8e550e7688a189ff80832433
parente30c0ada6d0174e044b96fbedf5946c3be66e956
Fix gcc compiler warning, dsl_pool_create()

When compiling ZFS in user space gcc-4.6.0 correctly identifies
the variable 'os' as being set but never used.  This generates a
warning and a build failure when using --enable-debug.  However,
the code is correct we only want to use 'os' for the kernel space
builds.  To suppress the warning the call was wrapped with a
VERIFY() which has the nice side effect of ensuring the 'os'
actually never is NULL.  This was observed under Fedora 15.

  module/zfs/dsl_pool.c: In function ‘dsl_pool_create’:
  module/zfs/dsl_pool.c:229:12: error: variable ‘os’ set but not used
  [-Werror=unused-but-set-variable]
module/zfs/dsl_pool.c