diff options
author | Gordon Ross <gwr@nexenta.com> | 2016-04-22 16:13:20 -0400 |
---|---|---|
committer | Gordon Ross <gwr@nexenta.com> | 2019-05-17 16:29:13 -0400 |
commit | 54026d5ae0b8cbf8da5c14341d51f7a3cab03758 (patch) | |
tree | 4d198e8632a0806aa326fcb5810e2d34816d43e6 /usr | |
parent | a9cc46cf4c50667eb8eaf3af6c3bc4a74677b725 (diff) | |
download | illumos-joyent-54026d5ae0b8cbf8da5c14341d51f7a3cab03758.tar.gz |
10903 Enable compile warnings re. parentheses in smbsrv
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/common/acl/acl_common.c | 3 | ||||
-rw-r--r-- | usr/src/lib/smbsrv/Makefile.targ | 2 | ||||
-rw-r--r-- | usr/src/lib/smbsrv/libfksmbsrv/Makefile.com | 1 | ||||
-rw-r--r-- | usr/src/lib/smbsrv/libfksmbsrv/common/fake_lookup.c | 4 | ||||
-rw-r--r-- | usr/src/lib/smbsrv/libfksmbsrv/common/fake_xattr.c | 2 | ||||
-rw-r--r-- | usr/src/lib/smbsrv/libmlsvc/Makefile.com | 1 | ||||
-rwxr-xr-x | usr/src/tools/quick/make-smbsrv | 56 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_server.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_vops.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/tzfile.h | 2 | ||||
-rw-r--r-- | usr/src/uts/intel/smbsrv/Makefile | 1 | ||||
-rw-r--r-- | usr/src/uts/sparc/smbsrv/Makefile | 1 |
12 files changed, 30 insertions, 49 deletions
diff --git a/usr/src/common/acl/acl_common.c b/usr/src/common/acl/acl_common.c index 59c2e38b82..eb4fca808e 100644 --- a/usr/src/common/acl/acl_common.c +++ b/usr/src/common/acl/acl_common.c @@ -1695,7 +1695,8 @@ ace_trivial_common(void *acep, int aclcnt, uint16_t type; uint64_t cookie = 0; - while (cookie = walk(acep, cookie, aclcnt, &flags, &type, &mask)) { + while ((cookie = walk(acep, cookie, aclcnt, &flags, &type, &mask)) + != NULL) { switch (flags & ACE_TYPE_FLAGS) { case ACE_OWNER: case ACE_GROUP|ACE_IDENTIFIER_GROUP: diff --git a/usr/src/lib/smbsrv/Makefile.targ b/usr/src/lib/smbsrv/Makefile.targ index 9305212b3c..3128bbc408 100644 --- a/usr/src/lib/smbsrv/Makefile.targ +++ b/usr/src/lib/smbsrv/Makefile.targ @@ -36,8 +36,6 @@ pics/%.o: $(SRC)/common/smbsrv/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o := CPPFLAGS += -I$(ROOTSMBHDRDIR)/ndl - .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com b/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com index ce8ce63fe3..168343801b 100644 --- a/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com +++ b/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com @@ -213,7 +213,6 @@ CPPFLAGS += -D_FILE_OFFSET_BITS=64 # Always want DEBUG here CPPFLAGS += -DDEBUG -CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch # not linted diff --git a/usr/src/lib/smbsrv/libfksmbsrv/common/fake_lookup.c b/usr/src/lib/smbsrv/libfksmbsrv/common/fake_lookup.c index c475980dc1..7cd43cd92e 100644 --- a/usr/src/lib/smbsrv/libfksmbsrv/common/fake_lookup.c +++ b/usr/src/lib/smbsrv/libfksmbsrv/common/fake_lookup.c @@ -135,7 +135,7 @@ next: /* * Process the next component of the pathname. */ - if (error = pn_getcomponent(pnp, component)) { + if ((error = pn_getcomponent(pnp, component)) != 0) { goto bad; } @@ -307,7 +307,7 @@ checkforroot: goto bad; } pn_alloc(&linkpath); - if (error = pn_getsymlink(cvp, &linkpath, cr)) { + if ((error = pn_getsymlink(cvp, &linkpath, cr)) != 0) { pn_free(&linkpath); goto bad; } diff --git a/usr/src/lib/smbsrv/libfksmbsrv/common/fake_xattr.c b/usr/src/lib/smbsrv/libfksmbsrv/common/fake_xattr.c index 852b2e870f..25c90a1e42 100644 --- a/usr/src/lib/smbsrv/libfksmbsrv/common/fake_xattr.c +++ b/usr/src/lib/smbsrv/libfksmbsrv/common/fake_xattr.c @@ -76,7 +76,7 @@ getxva_parse_nvl(xvattr_t *xvap, nvpair_t *pair = NULL; int error; - while (pair = nvlist_next_nvpair(nvl, pair)) { + while ((pair = nvlist_next_nvpair(nvl, pair)) != NULL) { data_type_t type; f_attr_t attr; boolean_t value = B_FALSE; diff --git a/usr/src/lib/smbsrv/libmlsvc/Makefile.com b/usr/src/lib/smbsrv/libmlsvc/Makefile.com index a613eb24b4..b0a3f80560 100644 --- a/usr/src/lib/smbsrv/libmlsvc/Makefile.com +++ b/usr/src/lib/smbsrv/libmlsvc/Makefile.com @@ -82,6 +82,7 @@ include ../../../Makefile.lib include ../../Makefile.lib INCS += -I$(SRC)/common/smbsrv +INCS += -I$(SRC)/uts/common/smbsrv/ndl LDLIBS += $(MACH_LDLIBS) LDLIBS += -lmlrpc -lsmb -lsmbns -lshare -lsmbfs -lnsl -lpkcs11 \ diff --git a/usr/src/tools/quick/make-smbsrv b/usr/src/tools/quick/make-smbsrv index 1cc55a999b..d5809420d2 100755 --- a/usr/src/tools/quick/make-smbsrv +++ b/usr/src/tools/quick/make-smbsrv @@ -14,8 +14,8 @@ # Copyright 2018 Nexenta Systems, Inc. All rights reserved. # -# Use distributed make (dmake) by default. -make=${MAKE:-dmake} +# Use normal make (not dmake) by default. +make=${MAKE:-make} CLOSED_IS_PRESENT=no export CLOSED_IS_PRESENT @@ -80,22 +80,28 @@ then (cd $SRC/uts && $make -k all_h) test -f $SRC/head/rpcsvc/nispasswd.h || - (cd $SRC/head && $make -k install_h) + (cd $SRC/head && $make -k $targ) # ... stuff under $ROOT (proto area) test -d $ROOT/usr/include/sys || (cd $SRC && $make rootdirs) test -f $ROOT/usr/include/sys/types.h || - (cd $SRC/uts && $make -k install_h) + (cd $SRC/uts && $make -k $targ) test -f $ROOT/usr/include/rpcsvc/daemon_utils.h || - (cd $SRC/head && $make install_h) + (cd $SRC/head && $make $targ) # always update the smbsrv headers to be safe - (cd $SRC/uts/common/gssapi && $make -k install_h) - (cd $SRC/uts/common/sys && $make -k install_h) - (cd $SRC/uts/common/smb && $make -k install_h) - (cd $SRC/uts/common/smbsrv && $make -k install_h) + (cd $SRC/uts/common/gssapi && $make -k $targ) + (cd $SRC/uts/common/sys && $make -k $targ) + (cd $SRC/uts/common/smb && $make -k $targ) + (cd $SRC/uts/common/smbsrv && $make -k $targ) +fi +if [ "$targ" = lint ] +then + targ=check + (cd $SRC/uts/common/smb && $make -k $targ) + (cd $SRC/uts/common/smbsrv && $make -k $targ) fi # Need some library headers too... @@ -117,7 +123,10 @@ for lib in \ libsmbfs \ libsqlite \ libuutil \ + libzfs_core \ + libzfs \ passwdutil \ + pkcs11 \ smbsrv do (cd $SRC/lib/$lib && $make $targ) @@ -182,19 +191,6 @@ done do_cmds() { -case $1 in -install) - # mount programs need fslib.o - (cd $SRC/cmd/fs.d && $make fslib.o) - (cd $SRC/cmd/fs.d/smbclnt && $make $1 catalog) - ;; -clean|clobber) - (cd $SRC/cmd/fs.d/smbclnt && $make $1) - (cd $SRC/cmd/fs.d && $make ${1}_local) - ;; -esac - -(cd $SRC/cmd/devfsadm && $make $1) (cd $SRC/cmd/smbsrv && $make $1) # Build the MDB modules, WITH the linktest @@ -213,10 +209,6 @@ do $make -k $1 ) ;; esac - (cd $SRC/cmd/mdb/$x/$a/nsmb && - $make $1 KMDB_LINKTEST_ENABLE= ) - (cd $SRC/cmd/mdb/$x/$a/smbfs && - $make $1 KMDB_LINKTEST_ENABLE= ) (cd $SRC/cmd/mdb/$x/$a/smbsrv && $make $1 KMDB_LINKTEST_ENABLE= ) done @@ -235,14 +227,6 @@ do $make $1 ) done - -(cd $SRC/cmd/Adm/sun && $make $1) - -# Deal with mode 0400 file annoyance... -# See usr/src/cmd/Adm/sun/Makefile -if [ $1 = install ]; then - chmod a+r $ROOT/var/smb/smbpasswd -fi } @@ -259,6 +243,7 @@ do_tags() { find uts/common/smbsrv -name '*.[ch]' -print |sort find uts/common/fs/smbsrv -name '*.[ch]' -print |sort find uts/common/gssapi -name '*.[ch]' -print |sort + find common/smbsrv -name '*.[ch]' -print |sort find head -name '*.h' -print |sort find lib/smbsrv -name '*.[ch]' -print |sort find lib/libsmbfs -name '*.[ch]' -print |sort @@ -267,7 +252,6 @@ do_tags() { find lib/libads -name '*.[ch]' -print |sort find lib/libgss -name '*.[ch]' -print |sort find cmd/smbsrv -name '*.[ch]' -print |sort - find common/smbsrv -name '*.[ch]' -print |sort ) > $SRC/cscope.files (cd $SRC ; @@ -296,7 +280,6 @@ usr/lib/smbsrv/libmlsvc.so.1 usr/lib/smbsrv/libsmb.so.1 usr/lib/smbsrv/libsmbns.so.1 usr/lib/smbsrv/smbd -usr/sbin/devfsadm usr/sbin/smbadm usr/sbin/smbstat " @@ -325,6 +308,7 @@ do do_cmds $arg ;; lint) + do_hdrs $arg do_kern $arg do_lib1 $arg do_lib2 $arg diff --git a/usr/src/uts/common/fs/smbsrv/smb_server.c b/usr/src/uts/common/fs/smbsrv/smb_server.c index cf6082e477..a2ea75c608 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_server.c +++ b/usr/src/uts/common/fs/smbsrv/smb_server.c @@ -625,7 +625,7 @@ smb_server_start(smb_ioc_start_t *ioc) sv->sv_lmshrd = smb_kshare_door_init(ioc->lmshrd); if (sv->sv_lmshrd == NULL) break; - if (rc = smb_kdoor_open(sv, ioc->udoor)) { + if ((rc = smb_kdoor_open(sv, ioc->udoor)) != 0) { cmn_err(CE_WARN, "Cannot open smbd door"); break; } @@ -634,7 +634,7 @@ smb_server_start(smb_ioc_start_t *ioc) fksmb_kdoor_open(sv, ioc->udoor_func); #endif /* _KERNEL */ - if (rc = smb_thread_start(&sv->si_thread_timers)) + if ((rc = smb_thread_start(&sv->si_thread_timers)) != 0) break; family = AF_INET; diff --git a/usr/src/uts/common/fs/smbsrv/smb_vops.c b/usr/src/uts/common/fs/smbsrv/smb_vops.c index fdcfeed19c..8e6c93f4b5 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_vops.c +++ b/usr/src/uts/common/fs/smbsrv/smb_vops.c @@ -1218,7 +1218,7 @@ smb_vop_acl_read(vnode_t *vp, acl_t **aclp, int flags, acl_type_t acl_type, return (EINVAL); } - if (error = VOP_GETSECATTR(vp, &vsecattr, flags, cr, &smb_ct)) + if ((error = VOP_GETSECATTR(vp, &vsecattr, flags, cr, &smb_ct)) != 0) return (error); *aclp = smb_fsacl_from_vsa(&vsecattr, acl_type); diff --git a/usr/src/uts/common/sys/tzfile.h b/usr/src/uts/common/sys/tzfile.h index 66e3c72a70..912a00a95e 100644 --- a/usr/src/uts/common/sys/tzfile.h +++ b/usr/src/uts/common/sys/tzfile.h @@ -137,7 +137,7 @@ struct tzhead { * that will probably do. */ -#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0) +#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) /* * Use of the underscored variants may cause problems if you move your code to diff --git a/usr/src/uts/intel/smbsrv/Makefile b/usr/src/uts/intel/smbsrv/Makefile index 8d7647c756..bb3739e10a 100644 --- a/usr/src/uts/intel/smbsrv/Makefile +++ b/usr/src/uts/intel/smbsrv/Makefile @@ -72,7 +72,6 @@ CLEANFILES += $(MODSTUBS_O) INC_PATH += -I$(SRC)/common -CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch # needs work diff --git a/usr/src/uts/sparc/smbsrv/Makefile b/usr/src/uts/sparc/smbsrv/Makefile index 7e51079dea..c0279c4e73 100644 --- a/usr/src/uts/sparc/smbsrv/Makefile +++ b/usr/src/uts/sparc/smbsrv/Makefile @@ -70,7 +70,6 @@ CLEANFILES += $(MODSTUBS_O) INC_PATH += -I$(SRC)/common -CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch # |