]> git.proxmox.com Git - mirror_zfs.git/commit - lib/libzfs/libzfs_dataset.c
Fix: Build warnings with different gcc optimization levels in debug mode
authorGeLiXin <ge.lixin@zte.com.cn>
Thu, 25 Aug 2016 08:40:20 +0000 (16:40 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 29 Aug 2016 19:46:18 +0000 (12:46 -0700)
commitc40db193a5e503fffacf6d96a7dd48a0f1b36601
tree3cf552cdbf468afe3d71377808671b6acebc2405
parent67925abb5e12c003e959c87ddec19a3842fe5976
Fix: Build warnings with different gcc optimization levels in debug mode

This fix resolves warnings reported during compiling with different gcc
optimization levels in debug mode,

Test tools:
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
Linux version: 2.6.32-573.18.1.el6.x86_64, Red Hat Enterprise Linux Server release 6.1 (Santiago)

List of warnings:
CFLAGS=-O1 ./configure --enable-debug ;make
../../module/icp/core/kcf_sched.c: In function ‘kcf_aop_done’:
../../module/icp/core/kcf_sched.c:499: error: ‘fg’ may be used uninitialized in this function
../../module/icp/core/kcf_sched.c:499: note: ‘fg’ was declared here

CFLAGS=-Os ./configure --enable-debug ; make
libzfs_dataset.c: In function ‘zfs_prop_set_list’:
libzfs_dataset.c:1575: error: ‘nvl_len’ may be used uninitialized in this function

Signed-off-by: GeLiXin <ge.lixin@zte.com.cn>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5022
lib/libzfs/libzfs_dataset.c [changed mode: 0644->0755]
module/icp/core/kcf_sched.c [changed mode: 0644->0755]