Project

General

Profile

Bug #6550

cmd/zfs: cleanup gcc warnings

Added by Igor Kozhukhov over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
2016-01-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-type-limits
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-uninitialized
CERRWARN += -_gcc=-Wno-old-style-declaration

+ /usr/gcc/4.4/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -fno-strict-aliasing -fno-unit-at-a-time -fno-optimize-sibling-calls -O2 -m64 -mtune=opteron -Ui386 -U__i386 -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -gdwarf-2 -std=gnu99 -msave-args -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/proto/root_i386/usr/include -D_LARGEFILE64_SOURCE=1 -D_REENTRANT -I../../common/zfs -DDEBUG -c zfs_main.c 
cc1: warnings being treated as errors
zfs_main.c: In function 'construct_fsacl_list':
zfs_main.c:5125: error: 'who_type' may be used uninitialized in this function [-Wuninitialized]
*** Error code 1
dmake: Fatal error: Command failed for target `zfs_main.o'
Current working directory /myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/cmd/zfs

+ /usr/gcc/4.4/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -fno-strict-aliasing -fno-unit-at-a-time -fno-optimize-sibling-calls -O2 -m64 -mtune=opteron -Ui386 -U__i386 -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -gdwarf-2 -std=gnu99 -msave-args -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/proto/root_i386/usr/include -D_LARGEFILE64_SOURCE=1 -D_REENTRANT -I../../common/zfs -DDEBUG -c zfs_iter.c 
cc1: warnings being treated as errors
zfs_iter.c: In function 'zfs_for_each':
zfs_iter.c:394: error: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
*** Error code 1
dmake: Fatal error: Command failed for target `zfs_iter.o'
Current working directory /myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/cmd/zfs

+ /usr/gcc/4.4/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -O -m32 -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -gdwarf-2 -std=gnu99 -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/proto/root_i386/usr/include -D_LARGEFILE64_SOURCE=1 -D_REENTRANT -I../../common/zfs -DDEBUG -c zfs_main.c 
cc1: warnings being treated as errors
zfs_main.c: In function 'unshare_unmount':
zfs_main.c:6471: error: 'tree' may be used uninitialized in this function [-Wuninitialized]
*** Error code 1
dmake: Fatal error: Command failed for target `zfs_main.o'
Current working directory /myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/cmd/zfs

illumos example:
zfs_iter.c:394: error: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dmake: Warning: Command failed for target `zfs_iter.o'
zfs_main.c:4995: error: 'who_type' may be used uninitialized in this function [-Wuninitialized]
zfs_main.c:6341: error: 'tree' may be used uninitialized in this function [-Wuninitialized]
dmake: Warning: Command failed for target `zfs_main.o'

History

#1

Updated by Igor Kozhukhov over 3 years ago

  • Description updated (diff)
#2

Updated by Electric Monk over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit c16bcc4577f389573eff411c7b7e040294078c3b

commit  c16bcc4577f389573eff411c7b7e040294078c3b
Author: Igor Kozhukhov <ikozhukhov@gmail.com>
Date:   2016-02-10T19:01:00.000Z

    6550 cmd/zfs: cleanup gcc warnings
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF