diff options
author | John Levon <john.levon@joyent.com> | 2018-12-17 23:44:05 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2019-01-14 19:06:48 +0000 |
commit | 5661bb7641e85c46713da7a3002b29ecd2c3daf0 (patch) | |
tree | e0d0a4ec2e103c5c62feb664509414cd03f9f24e /usr/src | |
parent | 05ede3db5e3b7d540afbccdc872c735770e82ef3 (diff) | |
download | illumos-gate-5661bb7641e85c46713da7a3002b29ecd2c3daf0.tar.gz |
10080 smatch Makefile changes for usr/src/cmd
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
324 files changed, 1330 insertions, 213 deletions
diff --git a/usr/src/cmd/abi/appcert/static_prof/Makefile.com b/usr/src/cmd/abi/appcert/static_prof/Makefile.com index de7b69f031..47e182f136 100644 --- a/usr/src/cmd/abi/appcert/static_prof/Makefile.com +++ b/usr/src/cmd/abi/appcert/static_prof/Makefile.com @@ -26,6 +26,7 @@ # # Copyright 2015 Nexenta Systems, Inc. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/cmd/Makefile.cmd @@ -35,6 +36,9 @@ SRCS = $(PROG:%=../%.c) CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + LDLIBS += -lelf LINTFLAGS = -nmxsuF -errtags=yes diff --git a/usr/src/cmd/abi/spectrans/Makefile.cmd b/usr/src/cmd/abi/spectrans/Makefile.cmd index 83b1d60cc5..131a8d2d5e 100644 --- a/usr/src/cmd/abi/spectrans/Makefile.cmd +++ b/usr/src/cmd/abi/spectrans/Makefile.cmd @@ -22,8 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/cmd/Makefile.cmd @@ -40,6 +39,9 @@ CPPFLAGS += -I$(U_BASE) -I.. LDFLAGS += -L$(U_DIR) LINTFLAGS += -xsuF -errtags=yes +# not linted +SMATCH=off + LDLIBS += -l$(U_LIB) -lgen LINTLIBS = -L$(U_DIR) -l$(U_LIB) diff --git a/usr/src/cmd/abi/spectrans/parser/Makefile.targ b/usr/src/cmd/abi/spectrans/parser/Makefile.targ index 314a5daf49..525b5bf824 100644 --- a/usr/src/cmd/abi/spectrans/parser/Makefile.targ +++ b/usr/src/cmd/abi/spectrans/parser/Makefile.targ @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. .KEEP_STATE: @@ -45,6 +46,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + objs/%.o: ../%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/abi/spectrans/spec2trace/Makefile.targ b/usr/src/cmd/abi/spectrans/spec2trace/Makefile.targ index 35fbdb839d..b07e6419d2 100644 --- a/usr/src/cmd/abi/spectrans/spec2trace/Makefile.targ +++ b/usr/src/cmd/abi/spectrans/spec2trace/Makefile.targ @@ -26,6 +26,7 @@ # # Copyright 2015 Nexenta Systems, Inc. All right reserved. # +# Copyright (c) 2018, Joyent, Inc. .KEEP_STATE: @@ -49,3 +50,7 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-label + +# not linted +SMATCH=off + diff --git a/usr/src/cmd/acct/Makefile b/usr/src/cmd/acct/Makefile index d199c32082..9d0b80f96a 100644 --- a/usr/src/cmd/acct/Makefile +++ b/usr/src/cmd/acct/Makefile @@ -23,6 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= acctcms acctcom acctcon acctcon1 acctcon2 \ acctdisk acctdusg acctmerg accton acctprc acctprc1 \ @@ -92,6 +93,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + .KEEP_STATE: .PARALLEL: $(ALL) diff --git a/usr/src/cmd/acct/lib/Makefile b/usr/src/cmd/acct/lib/Makefile index c7e94d6c0d..8468349fc6 100644 --- a/usr/src/cmd/acct/lib/Makefile +++ b/usr/src/cmd/acct/lib/Makefile @@ -19,14 +19,13 @@ # # CDDL HEADER END # -# # Copyright (c) 1989 by Sun Microsystems, Inc. -# +# Copyright (c) 2018, Joyent, Inc. # LIBS= a.a -OBJS= pnpsplit.o copyn.o devtolin.o expand.o lintodev.o \ - namtouid.o tmless.o tmsecs.o uidtonam.o substr.o +OBJS= pnpsplit.o devtolin.o expand.o lintodev.o \ + namtouid.o tmless.o tmsecs.o uidtonam.o substr.o SRCS= $(OBJS:%.o=%.c) include ../../Makefile.cmd @@ -36,6 +35,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-extra +# not linted +SMATCH=off + .KEEP_STATE: .PARALLEL: $(OBJS) diff --git a/usr/src/cmd/acpi/acpidump/Makefile b/usr/src/cmd/acpi/acpidump/Makefile index cb4244283b..73f6991c92 100644 --- a/usr/src/cmd/acpi/acpidump/Makefile +++ b/usr/src/cmd/acpi/acpidump/Makefile @@ -27,6 +27,9 @@ VPATH = ../common:$(SRC)/common/acpica/utilities:$(SRC)/common/acpica/tables CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + CPPFLAGS += -I$(SRC)/uts/intel/sys/acpi -DACPI_DUMP_APP LDLIBS += -ldevinfo diff --git a/usr/src/cmd/acpi/acpixtract/Makefile b/usr/src/cmd/acpi/acpixtract/Makefile index f2204b9941..e0be3125ad 100644 --- a/usr/src/cmd/acpi/acpixtract/Makefile +++ b/usr/src/cmd/acpi/acpixtract/Makefile @@ -26,6 +26,9 @@ VPATH = ../common:$(SRC)/common/acpica/utilities CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + CPPFLAGS += -I$(SRC)/uts/intel/sys/acpi -DACPI_XTRACT_APP .KEEP_STATE: diff --git a/usr/src/cmd/adbgen/Makefile.com b/usr/src/cmd/adbgen/Makefile.com index 17afe7784a..beeef6c0b0 100644 --- a/usr/src/cmd/adbgen/Makefile.com +++ b/usr/src/cmd/adbgen/Makefile.com @@ -25,6 +25,7 @@ # # Copyright 2015 RackTop Systems. # +# Copyright (c) 2018, Joyent, Inc. PROGS = adbgen1 adbgen3 adbgen4 OBJS = adbsub.o @@ -36,6 +37,10 @@ CLOBBERFILES = $(PROGS) $(OBJS) $(SCRIPTS) .KEEP_STATE: include ../../Makefile.cmd +include ../../Makefile.targ + +# not linted +SMATCH=off ROOTADBDIR32 = $(ROOT)/usr/lib/adb ROOTADBDIR64 = $(ROOT)/usr/lib/adb/$(MACH64) @@ -77,5 +82,3 @@ $(ROOTADBDIR32): $(ROOTADBDIR64): $(ROOTADBDIR32) $(INS.dir) - -include ../../Makefile.targ diff --git a/usr/src/cmd/addbadsec/Makefile b/usr/src/cmd/addbadsec/Makefile index 5903d759ff..fc45ac9abe 100644 --- a/usr/src/cmd/addbadsec/Makefile +++ b/usr/src/cmd/addbadsec/Makefile @@ -23,6 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= addbadsec OBJECTS= addbadsec.o ix_altsctr.o @@ -34,6 +35,9 @@ CPPFLAGS += -D_EXTVTOC CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/allocate/Makefile b/usr/src/cmd/allocate/Makefile index 41339cdde6..637283c06c 100644 --- a/usr/src/cmd/allocate/Makefile +++ b/usr/src/cmd/allocate/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. ETCTSOLFILES = devalloc_defaults @@ -32,6 +33,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-clobbered +# not linted +SMATCH=off + ROOTSEC = $(ROOTETC)/security ROOTSECDEV = $(ROOTSEC)/dev ROOTSECLIB = $(ROOTSEC)/lib diff --git a/usr/src/cmd/ast/msgcc/Makefile b/usr/src/cmd/ast/msgcc/Makefile index 1198c6184f..306cb54f72 100644 --- a/usr/src/cmd/ast/msgcc/Makefile +++ b/usr/src/cmd/ast/msgcc/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. SHELL=/usr/bin/ksh93 @@ -51,6 +52,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-empty-body CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -last msgcpp := LDLIBS += -lpp diff --git a/usr/src/cmd/audio/audioplay/Makefile b/usr/src/cmd/audio/audioplay/Makefile index f899ec0e32..23ce81e74d 100644 --- a/usr/src/cmd/audio/audioplay/Makefile +++ b/usr/src/cmd/audio/audioplay/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= audioplay @@ -40,6 +41,8 @@ CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += indenting + LINTFLAGS += -m -v -u $(LDFLAGS) .KEEP_STATE: diff --git a/usr/src/cmd/audio/utilities/Makefile b/usr/src/cmd/audio/utilities/Makefile index 4b11e0eec9..d2d68162b1 100644 --- a/usr/src/cmd/audio/utilities/Makefile +++ b/usr/src/cmd/audio/utilities/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Makefile for C++ Audio Library (libAudio.a) +# Copyright (c) 2018, Joyent, Inc. include ../../Makefile.cmd @@ -37,6 +37,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + LINTFLAGS += -m -v -u AR= /usr/ccs/bin/ar diff --git a/usr/src/cmd/auditd/Makefile b/usr/src/cmd/auditd/Makefile index be82c21abc..a61c459db5 100644 --- a/usr/src/cmd/auditd/Makefile +++ b/usr/src/cmd/auditd/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG = auditd @@ -39,6 +40,8 @@ CPPFLAGS += -I$(LIBBSM) -I$(AUDITD) CERRWARN += -_gcc=-Wno-parentheses +SMOFF += macros + LDLIBS += -lbsm -lsecdb OBJS = auditd.o doorway.o queue.o diff --git a/usr/src/cmd/auditreduce/Makefile b/usr/src/cmd/auditreduce/Makefile index e84d51d229..2ddee8299b 100644 --- a/usr/src/cmd/auditreduce/Makefile +++ b/usr/src/cmd/auditreduce/Makefile @@ -24,7 +24,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. TABLEDIR = ../praudit @@ -44,6 +44,9 @@ LDLIBS += -lnsl -lbsm -lscf -ltsol CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses +# false positives / need cleanup +SMOFF += indenting,no_if_block,strcpy_overflow + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/awk/Makefile b/usr/src/cmd/awk/Makefile index 3eb805c71a..0b38940b29 100644 --- a/usr/src/cmd/awk/Makefile +++ b/usr/src/cmd/awk/Makefile @@ -24,6 +24,7 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # NOTE: awk is oawk. @@ -42,6 +43,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + # # Message catalog # diff --git a/usr/src/cmd/awk_xpg4/Makefile b/usr/src/cmd/awk_xpg4/Makefile index dce7e2639c..dc03ef3b1e 100644 --- a/usr/src/cmd/awk_xpg4/Makefile +++ b/usr/src/cmd/awk_xpg4/Makefile @@ -25,6 +25,7 @@ # # cmd/awk_xpg4/Makefile # +# Copyright (c) 2018, Joyent, Inc. # NOTE: this is nawk in usr/src/cmd/awk_xpg4 to reside as /usr/xpg4/bin/awk @@ -48,6 +49,9 @@ YFLAGS += -d LDLIBS += -lm CLEANFILES= awk.c y.tab.h +# not linted +SMATCH=off + # for messaging catalog POFILE= awk_xpg4.po diff --git a/usr/src/cmd/backup/Makefile.backup b/usr/src/cmd/backup/Makefile.backup index 17d8986bf6..5a4712eb6e 100644 --- a/usr/src/cmd/backup/Makefile.backup +++ b/usr/src/cmd/backup/Makefile.backup @@ -23,6 +23,7 @@ # # cmd/backup/Makefile.backup # +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/cmd/Makefile.cmd @@ -44,6 +45,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-clobbered +# not linted +SMATCH=off + UFSROOTETC= $(ROOT)/etc UFSROOTUSR= $(ROOT)/usr UFSROOTUSRLIB= $(UFSROOTUSR)/lib diff --git a/usr/src/cmd/bart/Makefile b/usr/src/cmd/bart/Makefile index e36bbe26cd..67623232e0 100644 --- a/usr/src/cmd/bart/Makefile +++ b/usr/src/cmd/bart/Makefile @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= bart SRCS= rules.c create.c compare.c main.c lutbl.c @@ -34,6 +35,8 @@ LDLIBS += -lsec -lmd CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += indenting + # # for messaging catalog # @@ -46,7 +49,7 @@ ROOTLIBDIFFH= $(DIFFH:%=$(ROOTLIB)/%) .KEEP_STATE: -all: $(PROG) +all: $(PROG) $(PROG): $(OBJS) $(CC) -o $(PROG) $(OBJS) $(LDFLAGS) $(LDLIBS) diff --git a/usr/src/cmd/bc/Makefile b/usr/src/cmd/bc/Makefile index e910d2cd59..85848c2fd7 100644 --- a/usr/src/cmd/bc/Makefile +++ b/usr/src/cmd/bc/Makefile @@ -23,6 +23,7 @@ # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= bc XPG6PROG= bc @@ -39,6 +40,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label +# nothing lintable +SMATCH=off + $(XPG6EXOBJS) := CFLAGS += -DXPG6 ROOTLIBB= $(LIBB:%=$(ROOTLIB)/%) $(ROOTLIBB) := FILEMODE = $(LIBFILEMODE) diff --git a/usr/src/cmd/bdiff/Makefile b/usr/src/cmd/bdiff/Makefile index 9ce2350115..0b76705ff5 100644 --- a/usr/src/cmd/bdiff/Makefile +++ b/usr/src/cmd/bdiff/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1989, 1996 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG= bdiff @@ -33,6 +34,9 @@ FILEMODE= 755 CPPFLAGS += -D_FILE_OFFSET_BITS=64 CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/boot/bootadm/Makefile b/usr/src/cmd/boot/bootadm/Makefile index da5dbf5332..9946fef461 100644 --- a/usr/src/cmd/boot/bootadm/Makefile +++ b/usr/src/cmd/boot/bootadm/Makefile @@ -25,7 +25,7 @@ # Copyright 2016 Toomas Soome <tsoome@me.com> # Copyright 2016 Nexenta Systems, Inc. # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. -# +# Copyright (c) 2018, Joyent, Inc. PROG= bootadm @@ -52,6 +52,8 @@ CFLAGS += $(XSTRCONST) CPPFLAGS += -D_FILE_OFFSET_BITS=64 CPPFLAGS += -I$(SRC)/uts/common -I$(SRC)/common -I$(SRC)/common/ficl +SMOFF += all_func_returns + CSTD= $(CSTD_GNU99) LINTFLAGS += -erroff=E_INCONS_ARG_DECL2 diff --git a/usr/src/cmd/boot/fiocompress/Makefile b/usr/src/cmd/boot/fiocompress/Makefile index cf64ed1c6e..158a9a5863 100644 --- a/usr/src/cmd/boot/fiocompress/Makefile +++ b/usr/src/cmd/boot/fiocompress/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= fiocompress @@ -39,6 +40,8 @@ LDLIBS += -lz CFLAGS += -I../../../uts/common LINTFLAGS += -I../../../uts/common +SMOFF += leaks + all: $(PROG) $(PROG): $(OBJS) diff --git a/usr/src/cmd/boot/installgrub/Makefile b/usr/src/cmd/boot/installgrub/Makefile index 3269e7d7ef..e8cdc18cdc 100644 --- a/usr/src/cmd/boot/installgrub/Makefile +++ b/usr/src/cmd/boot/installgrub/Makefile @@ -20,7 +20,7 @@ # # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2015, Nexenta Systems, Inc. -# +# Copyright (c) 2018, Joyent, Inc. PROG= installgrub @@ -40,6 +40,9 @@ include ../Makefile.com CPPFLAGS += -I$(SRC)/uts/i86pc -I$(SRC)/uts/intel -I$(SRC)/uts/common CPPFLAGS += -I$(SRC)/common/util +# not linted +SMATCH=off + LDLIBS += -lmd5 i386_CFLAGS += -D_LARGEFILE64_SOURCE diff --git a/usr/src/cmd/captoinfo/Makefile b/usr/src/cmd/captoinfo/Makefile index 45313d00dd..3318414d11 100644 --- a/usr/src/cmd/captoinfo/Makefile +++ b/usr/src/cmd/captoinfo/Makefile @@ -23,6 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= captoinfo @@ -36,9 +37,12 @@ LDLIBS += -lcurses CPPFLAGS += -I../../lib/libcurses/screen CERRWARN += -_gcc=-Wno-parentheses +# code is a mess right now +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) $(PROG): $(OBJS) $(MAPFILE.INT) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) diff --git a/usr/src/cmd/cdrw/Makefile b/usr/src/cmd/cdrw/Makefile index 2b626aeb59..f44584ed69 100644 --- a/usr/src/cmd/cdrw/Makefile +++ b/usr/src/cmd/cdrw/Makefile @@ -22,6 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= cdrw @@ -42,6 +43,9 @@ CERRWARN += -_gcc=-Wno-parentheses CPPFLAGS += -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(HAL_DBUS_CPPFLAGS) LINTFLAGS += -um +# not linted +SMATCH=off + $(ROOTBIN)/cdrw := FILEMODE = 04755 .KEEP_STATE: @@ -52,7 +56,7 @@ $(PROG): $(OBJS) $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) $(NONLINTLDLIBS) $(CFLAGS) $(POST_PROCESS) -install: all $(ROOTPROG) +install: all $(ROOTPROG) clean: $(RM) $(OBJS) diff --git a/usr/src/cmd/cfgadm/Makefile b/usr/src/cmd/cfgadm/Makefile index ba1d06d514..08280bcb91 100644 --- a/usr/src/cmd/cfgadm/Makefile +++ b/usr/src/cmd/cfgadm/Makefile @@ -23,11 +23,9 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# -# cmd/cfgadm/Makefile +# Copyright (c) 2018, Joyent, Inc. -PROG= cfgadm +PROG= cfgadm include ../Makefile.cmd @@ -36,12 +34,14 @@ DCFILE= $(PROG).dc XGETFLAGS += -a -x cfgadm.xcl -LDLIBS += -lcfgadm +LDLIBS += -lcfgadm LINTFLAGS += $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) $(LDLIBS) +SMOFF += snprintf_overflow + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) -$(RM) $(ROOTETCPROG) diff --git a/usr/src/cmd/cmd-crypto/pktool/Makefile b/usr/src/cmd/cmd-crypto/pktool/Makefile index d33a9d5cc9..45a0113ca3 100644 --- a/usr/src/cmd/cmd-crypto/pktool/Makefile +++ b/usr/src/cmd/cmd-crypto/pktool/Makefile @@ -21,6 +21,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = pktool @@ -55,7 +56,10 @@ CFLAGS += $(CCVERBOSE) -DDEBUG CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-label -LDLIBS += -lkmf -lpkcs11 -lcryptoutil +# not linted, too much mess, but it should be +SMATCH=off + +LDLIBS += -lkmf -lpkcs11 -lcryptoutil .KEEP_STATE: diff --git a/usr/src/cmd/cmd-inet/lib/nwamd/Makefile b/usr/src/cmd/cmd-inet/lib/nwamd/Makefile index 28648b59bc..160b027d0c 100644 --- a/usr/src/cmd/cmd-inet/lib/nwamd/Makefile +++ b/usr/src/cmd/cmd-inet/lib/nwamd/Makefile @@ -21,8 +21,7 @@ # # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # -# usr/src/cmd/cmd-inet/lib/nwamd/Makefile -# +# Copyright (c) 2018, Joyent, Inc. # Needed for ROOTFS_LIBDIR definition include ../../../../lib/Makefile.lib @@ -60,6 +59,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-label +# not linted +SMATCH=off + # # Instrument with CTF data to ease debugging. # diff --git a/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile b/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile index f94222fc72..7c552b830f 100644 --- a/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile +++ b/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # Copyright (c) 2016, Chris Fraire <cfraire@me.com>. +# Copyright (c) 2018, Joyent, Inc. # PROG = dhcpagent @@ -41,6 +42,9 @@ XGETFLAGS += -a -x dhcpagent.xcl CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + # # to compile a debug version, do a `make COPTFLAG="-g -XO0"' # diff --git a/usr/src/cmd/cmd-inet/usr.bin/Makefile b/usr/src/cmd/cmd-inet/usr.bin/Makefile index 68ecf76b36..6e47c6e6f0 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/Makefile @@ -24,6 +24,7 @@ # # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2016 Toomas Soome <tsoome@me.com> +# Copyright (c) 2018, Joyent, Inc. # PROG= finger rdate ruptime rwho whois @@ -34,7 +35,7 @@ KCMDPROGS= rcp rlogin rsh SUBDIRS= chat dns-sd ftp nc nca netstat \ pppd pppdump pppstats rdist talk telnet tftp -SUBDIR1= talk +SUBDIR1= talk MSGSUBDIRS= nca talk # As programs get lint-clean, add them here. Eventually. @@ -75,6 +76,8 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-function +ruptime := SMOFF += leaks + # Eventually just plain CFLAGS should be += -v, but not until all in # PROGS are lint clean. $(LINTCLEAN) := CFLAGS += $(CCVERBOSE) @@ -148,7 +151,7 @@ $(COMMONOBJS): $(COMMONSRCS) rlogin: rlogin.o $(COMMONOBJS) $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) - + rcp: rcp.o $(COMMONOBJS) $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) @@ -156,7 +159,7 @@ rcp: rcp.o $(COMMONOBJS) rsh: rsh.o $(COMMONOBJS) $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) - + $(ROOTSUNWRCP): $(RM) $@; $(SYMLINK) ../bin/rcp $@ @@ -177,7 +180,7 @@ clean_local: clobber: $(SUBDIRS) clobber_local clobber_local: clean_local - $(RM) $(CLOBBERFILES) + $(RM) $(CLOBBERFILES) LINTLOCALS= $(LINTCLEAN:%.c=lint-%) diff --git a/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile b/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile index 23766b3a65..f0e4c3e0c9 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile @@ -2,6 +2,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= chat OBJS= chat.o @@ -14,6 +15,9 @@ LDFLAGS += $(MAPFILE.NGB:%=-M%) CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-trigraphs +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile b/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile index 9640cc9a2d..c58b1a375f 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile @@ -11,10 +11,9 @@ # # Copyright 2017 Toomas Soome <tsoome@me.com> +# Copyright (c) 2018, Joyent, Inc. # -# cmd/cmd-inet/usr.bin/dns-sd/Makefile - PROG= dns-sd include ../../../Makefile.cmd @@ -29,6 +28,9 @@ CPPFLAGS += -I$(SRCDIR)/mDNSShared CPPFLAGS += -DMDNS_VERSIONSTR_NODTS LDLIBS += -lsocket -ldns_sd +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile index 91b9e2e0d7..b2cf966be6 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile @@ -22,6 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = ftp DEFAULTFILES = ftp.dfl @@ -44,6 +45,9 @@ CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + LDLIBS += -lsocket -lnsl -lgss # ftp defines its own delete and glob - localize all symbols to prevent a diff --git a/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile b/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile index 10f743130a..e4de485e4e 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile @@ -24,7 +24,7 @@ # # Copyright (c) 1990 Mentat Inc. # -# cmd/cmd-inet/usr.bin/netstat/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= netstat @@ -50,9 +50,12 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses LDLIBS += -ldhcpagent -lsocket -lnsl -lkstat -ltsnet -ltsol +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) $(NPROG) +all: $(PROG) $(NPROG) ROOTPROG= $(PROG:%=$(ROOTBIN)/%) diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppdump/Makefile b/usr/src/cmd/cmd-inet/usr.bin/pppdump/Makefile index c8a1732e45..7908ed7488 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppdump/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/pppdump/Makefile @@ -1,6 +1,7 @@ # # Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # PROG= pppdump @@ -16,6 +17,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile b/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile index 358b559a48..837a6145e2 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/cmd-inet/usr.bin/rdist/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= rdist OBJS= docmd.o expand.o lookup.o main.o server.o @@ -55,6 +55,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + ROOTSYMLINK= $(ROOT)/usr/ucb/$(PROG) # conditional assignments diff --git a/usr/src/cmd/cmd-inet/usr.bin/talk/Makefile b/usr/src/cmd/cmd-inet/usr.bin/talk/Makefile index 4c17b1bbf4..d0565eec44 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/talk/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/talk/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= talk OBJS= talk.o get_names.o display.o io.o ctl.o init_disp.o \ @@ -42,6 +43,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CPPFLAGS += -DSYSV -DSTRNET -DBSD_COMP LDLIBS += -lcurses -lsocket -lnsl +# not linted +SMATCH=off + .KEEP_STATE: .PARALLEL: $(OBJS) diff --git a/usr/src/cmd/cmd-inet/usr.bin/telnet/Makefile b/usr/src/cmd/cmd-inet/usr.bin/telnet/Makefile index 967e6a1b6d..aa2173d849 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/telnet/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/telnet/Makefile @@ -22,6 +22,8 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. +# PROG= telnet OBJS= telnet.o commands.o main.o network.o ring.o \ @@ -53,6 +55,9 @@ LDLIBS += -lsocket -lnsl -ltermlib LDLIBS += -lmech_krb5 LDFLAGS += $(KRUNPATH) -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL) +# "missing type for func" +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cmd-inet/usr.lib/ilbd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/ilbd/Makefile index 2648c7cf05..2feba006c7 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/ilbd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/ilbd/Makefile @@ -20,6 +20,7 @@ # # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. ILBD= ilbd PROG= $(ILBD) @@ -53,6 +54,9 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-label +# not linted +SMATCH=off + CSTD = $(CSTD_GNU99) # I18n diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/Makefile index e1277f4e1d..4b8faf3a3f 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/Makefile @@ -23,6 +23,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= in.ndpd OBJS= config.o main.o ndp.o tables.o trace.o @@ -59,6 +60,9 @@ LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + CTFCONVERT_HOOK = && $(CTFCONVERT_O) CTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS) $(OBJS) := CFLAGS += $(CTF_FLAGS) diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/Makefile index acb1a9e7be..69f8880c5a 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/Makefile @@ -23,6 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. SVCMETHOD= svc-ripng MANIFEST= ripng.xml @@ -43,6 +44,9 @@ $(OBJS) := CPPFLAGS += $(_D_UNIX98_EXTN) LINTFLAGS += $(_D_UNIX98_EXTN) +# not linted +SMATCH=off + # in.ripngd uses the ancillary data feature which is available only through # UNIX 98 standards version of Socket interface. This interface is supposed to # be accessed by -lxnet. In addition, -lsocket is used to diff --git a/usr/src/cmd/cmd-inet/usr.lib/inetd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/inetd/Makefile index 2065957edf..4f91366ea2 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/inetd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/inetd/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = inetd MANIFEST= inetd.xml inetd-upgrade.xml @@ -42,6 +43,8 @@ $(RELEASE_BUILD)CPPFLAGS += -DNDEBUG CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-label +SMOFF += kmalloc_wrong_size + LDLIBS += -lsocket -lnsl -lrestart -lscf -lcontract -linetutil \ -lwrap -linetsvc -luutil -lumem -lbsm diff --git a/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile index 0aa9db8da9..7f3365c9ea 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile @@ -22,6 +22,7 @@ # Use is subject to license terms. # Copyright 2016 Toomas Soome <tsoome@me.com> # +# Copyright (c) 2018, Joyent, Inc. PROG= mdnsd MANIFEST= multicast.xml @@ -43,6 +44,13 @@ MDNSFLAGS= -DNOT_HAVE_SA_LEN \ include ../../../Makefile.cmd +CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-implicit-function-declaration +CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off + ROOTMANIFESTDIR= $(ROOTSVCNETWORKDNS) $(ROOTMANIFEST) := FILEMODE= 444 diff --git a/usr/src/cmd/cmd-inet/usr.lib/pppoe/Makefile b/usr/src/cmd/cmd-inet/usr.lib/pppoe/Makefile index 09987928be..8a448c3c6c 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/pppoe/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/pppoe/Makefile @@ -23,10 +23,7 @@ # Copyright 2000-2002 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/cmd-inet/usr.lib/pppoe/Makefile -# +# Copyright (c) 2018, Joyent, Inc. include ../../../Makefile.cmd @@ -36,6 +33,9 @@ DAEMON_OBJS= pppoed.o options.o logging.o common.o CPPFLAGS += -I$(SRC)/uts/common +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cmd-inet/usr.lib/wpad/Makefile b/usr/src/cmd/cmd-inet/usr.lib/wpad/Makefile index 1b82adef80..5dcf9c3755 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/wpad/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/wpad/Makefile @@ -21,6 +21,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = wpad MANIFEST = wpa.xml @@ -37,6 +38,8 @@ all install := LDLIBS += -lcrypto LINTFLAGS += -u +SMOFF += all_func_returns + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/Makefile index 7a72f274b8..3325b08925 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2014 Garrett D'Amore <garrett@damore.org> +# Copyright (c) 2018, Joyent, Inc. # SYNCPROG= syncinit syncloop syncstat @@ -109,6 +110,9 @@ CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-extra CERRWARN += -_gcc=-Wno-address +# "missing type for func" +SMATCH=off + # # Message catalog # diff --git a/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/Makefile index 5b2f2eb275..73b2b67758 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/Makefile @@ -20,6 +20,7 @@ # # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG= ilbadm @@ -39,6 +40,9 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + CSTD = $(CSTD_GNU99) POFILES = $(OBJS:%.o=%.po) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/Makefile index 4a001e9c16..4d5ca0b991 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/Makefile @@ -21,6 +21,8 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. +# PROG= in.rdisc MANIFEST= rdisc.xml @@ -35,6 +37,9 @@ LDLIBS += -lsocket -lnsl CPPFLAGS += -DSYSV -DBSD_COMP CERRWARN += -_gcc=-Wno-extra +# "missing type for func" +SMATCH = off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/in.routed/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/in.routed/Makefile index 8159456d34..022fc53a8b 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/in.routed/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/in.routed/Makefile @@ -3,6 +3,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. ROUTEDPROG= in.routed ROUTEDOBJS= common.o if.o input.o main.o output.o parms.o radix.o \ @@ -39,6 +40,9 @@ CPPFLAGS += $(_D_XOPEN_EXTN) CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lxnet -lmd -lsocket CLEAN_FILES += $(ROUTEDOBJS) $(RTQUERYOBJS) CLOBBERFILES += $(ROUTEDPROG) $(RTQUERYPROG) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/ipqosconf/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/ipqosconf/Makefile index 28dd4654f6..485110bb74 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/ipqosconf/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/ipqosconf/Makefile @@ -22,9 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # - -# -# cmd/cmd-inet/usr.sbin/ipqosconf/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= ipqosconf OBJS= ipqosconf.o @@ -55,6 +53,9 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lsocket -lnsl -lnvpair -lipp .KEEP_STATE: diff --git a/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/Makefile index 2433e90df6..3cbe3dbb38 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= ikeadm ipsecalgs ipsecconf ipseckey ikecert SOCKETPROG= ipsecalgs ipsecconf ipseckey @@ -59,6 +60,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-switch +# not linted +SMATCH=off + CFLAGS += $(XSTRCONST) LDLIBS += -lipsecutil -lnsl diff --git a/usr/src/cmd/cmd-inet/usr.sbin/nwamadm/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/nwamadm/Makefile index 00c4998b2b..e3984bdda6 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/nwamadm/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/nwamadm/Makefile @@ -23,8 +23,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# -# cmd/cmd-inet/usr.sbin/nwamadm/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= nwamadm @@ -36,9 +35,12 @@ LDLIBS += -lofmt -linetutil -lnsl -lnwam -lumem -lscf CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/nwamcfg/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/nwamcfg/Makefile index 0c51a0301b..25d961bdb1 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/nwamcfg/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/nwamcfg/Makefile @@ -24,7 +24,7 @@ # Use is subject to license terms. # Copyright (c) 2016, Chris Fraire <cfraire@me.com>. # -# cmd/cmd-inet/usr.sbin/nwamcfg/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= nwamcfg OBJS= nwamcfg.o nwamcfg_lex.o nwamcfg_grammar.tab.o @@ -44,9 +44,11 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-implicit-function-declaration +SMOFF += all_func_returns + .KEEP_STATE: -all: $(PROG) +all: $(PROG) $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile index 1d408bccba..55327064e7 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile @@ -22,6 +22,7 @@ # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# Copyright (c) 2018, Joyent, Inc. # PROG= snoop @@ -60,6 +61,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-function +# we really should have smatch running on this code but... +SMATCH=off + .KEEP_STATE: .PARALLEL: $(OBJS) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/wificonfig/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/wificonfig/Makefile index b5732647eb..713cbdb1aa 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/wificonfig/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/wificonfig/Makefile @@ -23,6 +23,7 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= wificonfig OBJS= wificonfig.o @@ -37,6 +38,9 @@ ROOTUSRSBINLINKS = $(ROOTUSRSBIN)/$(PROG) CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-parentheses +# needs work +SMOFF += index_overflow,memcpy_overflow + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cpc/cpustat/Makefile b/usr/src/cmd/cpc/cpustat/Makefile index 1bf30678cd..edff7bd831 100644 --- a/usr/src/cmd/cpc/cpustat/Makefile +++ b/usr/src/cmd/cpc/cpustat/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = cpustat OBJS = $(PROG).o caps.o time.o setgrp.o strtoset.o @@ -40,6 +41,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CPPFLAGS += -D_REENTRANT -I$(SRC)/lib/libcpc/common -I$(STATCOMMONDIR) LDLIBS += -lcpc -lkstat +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/cpc/cputrack/Makefile.com b/usr/src/cmd/cpc/cputrack/Makefile.com index d67fb933dd..8226e1a57c 100644 --- a/usr/src/cmd/cpc/cputrack/Makefile.com +++ b/usr/src/cmd/cpc/cputrack/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# +# Copyright (c) 2018, Joyent, Inc. include ../../../Makefile.cmd @@ -36,6 +35,9 @@ CFLAGS += $(CCVERBOSE) $(CTF_FLAGS) CFLAGS64 += $(CCVERBOSE) $(CTF_FLAGS) CPPFLAGS += -I$(SRC)/lib/libcpc/common +# not linted +SMATCH=off + LINTFLAGS += -u LINTFLAGS64 += -u diff --git a/usr/src/cmd/cpio/Makefile b/usr/src/cmd/cpio/Makefile index 3acc24cebd..ccad9b0efc 100644 --- a/usr/src/cmd/cpio/Makefile +++ b/usr/src/cmd/cpio/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= cpio @@ -32,12 +33,15 @@ CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DSOLARIS_PRIVS CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lsec -lcmdutils -lnvpair XGETFLAGS += -a -x cpio.xcl .KEEP_STATE: -all: $(PROG) +all: $(PROG) $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) diff --git a/usr/src/cmd/cron/Makefile b/usr/src/cmd/cron/Makefile index 2875e0dece..5c324d9e86 100644 --- a/usr/src/cmd/cron/Makefile +++ b/usr/src/cmd/cron/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. DEFAULTFILES = cron.dfl @@ -39,6 +40,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-value +# not linted +SMATCH=off + ROOTVAR = $(ROOT)/var ROOTSPCRON = $(ROOTVAR)/spool/cron diff --git a/usr/src/cmd/csh/i386/Makefile b/usr/src/cmd/csh/i386/Makefile index 5f05c1b91f..c019a85dee 100644 --- a/usr/src/cmd/csh/i386/Makefile +++ b/usr/src/cmd/csh/i386/Makefile @@ -6,7 +6,8 @@ # Copyright (c) 1980 Regents of the University of California. # All rights reserved. The Berkeley Software License Agreement # specifies the terms and conditions for redistribution. - +# +# Copyright (c) 2018, Joyent, Inc. # # C Shell with process control; VM/UNIX VAX Makefile # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria @@ -34,6 +35,9 @@ CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-extra +# "missing type for func" +SMATCH=off + MAPFILES = ../mapfile-intf $(MAPFILE.NGB) LDFLAGS += $(MAPFILES:%=-M%) diff --git a/usr/src/cmd/cxgbetool/Makefile b/usr/src/cmd/cxgbetool/Makefile index 4a39c9e80f..c8557b453f 100644 --- a/usr/src/cmd/cxgbetool/Makefile +++ b/usr/src/cmd/cxgbetool/Makefile @@ -12,12 +12,16 @@ # # Copyright (c) 2018 by Chelsio Communications, Inc. # +# Copyright (c) 2018, Joyent, Inc. + PROG = cxgbetool include ../Makefile.cmd CFLAGS += $(CCVERBOSE) -I$(SRC)/uts/common/io/cxgbe/t4nex -I$(SRC)/uts/common/io/cxgbe/firmware +SMOFF += all_func_returns + all: $(PROG) install: all $(ROOTUSRSBINPROG) diff --git a/usr/src/cmd/dc/Makefile b/usr/src/cmd/dc/Makefile index 50f4a4e60f..58ddd81f1a 100644 --- a/usr/src/cmd/dc/Makefile +++ b/usr/src/cmd/dc/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= dc XPG6PROG= dc @@ -37,6 +38,9 @@ CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(MAPFILE.NGB) $(PROG) $(XPG6) diff --git a/usr/src/cmd/devfsadm/Makefile.com b/usr/src/cmd/devfsadm/Makefile.com index 1585db2894..b446b148ff 100644 --- a/usr/src/cmd/devfsadm/Makefile.com +++ b/usr/src/cmd/devfsadm/Makefile.com @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # This target builds both a command (daemon) and various shared objects. This # isn't a typical target, and the inclusion of both library and command @@ -99,6 +100,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + # Define the dependencies required by devfsadm and all shared objects. LDLIBS += -ldevinfo devfsadm := LDLIBS += -lgen -lsysevent -lnvpair -lzonecfg -lbsm diff --git a/usr/src/cmd/devmgmt/cmds/Makefile b/usr/src/cmd/devmgmt/cmds/Makefile index 56bd277ec8..6eaec76115 100644 --- a/usr/src/cmd/devmgmt/cmds/Makefile +++ b/usr/src/cmd/devmgmt/cmds/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include ../../Makefile.cmd @@ -38,6 +39,8 @@ LDLIBS += -ladm CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += signed + .KEEP_STATE: .PARALLEL: $(PROG) diff --git a/usr/src/cmd/diskscan/Makefile b/usr/src/cmd/diskscan/Makefile index fc82a22936..a9c6f0ab42 100644 --- a/usr/src/cmd/diskscan/Makefile +++ b/usr/src/cmd/diskscan/Makefile @@ -20,15 +20,18 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1989, 2001 by Sun Microsystems, Inc. # All rights reserved. +# +# Copyright (c) 2018, Joyent, Inc. + PROG= diskscan include ../Makefile.cmd +SMOFF += leaks + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/dladm/Makefile b/usr/src/cmd/dladm/Makefile index 1eeede7152..ef2b9868ef 100644 --- a/usr/src/cmd/dladm/Makefile +++ b/usr/src/cmd/dladm/Makefile @@ -18,11 +18,10 @@ # # CDDL HEADER END # - -# # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= dladm ROOTFS_PROG= $(PROG) @@ -45,6 +44,8 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += snprintf_overflow + # For headers from librstp. LINTFLAGS += -erroff=E_TRAILING_COMMA_IN_ENUM lint := ZLAZYLOAD= diff --git a/usr/src/cmd/dlstat/Makefile b/usr/src/cmd/dlstat/Makefile index c24ce1a62d..bd274d10c0 100644 --- a/usr/src/cmd/dlstat/Makefile +++ b/usr/src/cmd/dlstat/Makefile @@ -22,7 +22,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. PROG= dlstat @@ -35,6 +35,9 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + XGETFLAGS += -a -x $(PROG).xcl LDLIBS += -L$(ROOT)/lib LDLIBS += -ldladm -lofmt diff --git a/usr/src/cmd/dtrace/test/cmd/baddof/Makefile b/usr/src/cmd/dtrace/test/cmd/baddof/Makefile index 4162cda817..086c652d2d 100644 --- a/usr/src/cmd/dtrace/test/cmd/baddof/Makefile +++ b/usr/src/cmd/dtrace/test/cmd/baddof/Makefile @@ -23,6 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/cmd/Makefile.cmd @@ -40,6 +41,9 @@ CMDS = $(SRCS:%=$(ROOTBIN)/%) CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + $(CMDS) := FILEMODE = 0555 all: $(SRCS) diff --git a/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile b/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile index 789bd0510e..ddbf401e31 100644 --- a/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile +++ b/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile @@ -23,6 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/cmd/Makefile.cmd @@ -40,6 +41,9 @@ CMDS = $(SRCS:%=$(ROOTBIN)/%) CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + $(CMDS) := FILEMODE = 0555 all: $(SRCS) diff --git a/usr/src/cmd/dtrace/test/tst/Makefile.com b/usr/src/cmd/dtrace/test/tst/Makefile.com index d4b787d5ec..0d8fb3316c 100644 --- a/usr/src/cmd/dtrace/test/tst/Makefile.com +++ b/usr/src/cmd/dtrace/test/tst/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/cmd/Makefile.cmd @@ -66,6 +67,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + all: $(EXES) clean lint: diff --git a/usr/src/cmd/ed/Makefile b/usr/src/cmd/ed/Makefile index b6737d8978..0c9339377e 100644 --- a/usr/src/cmd/ed/Makefile +++ b/usr/src/cmd/ed/Makefile @@ -22,6 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= ed XPG4PROG= ed @@ -42,6 +43,10 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off + $(XPG4) := CFLAGS += -DXPG4 $(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc lint := LDLIBS += -lgen -lcrypt diff --git a/usr/src/cmd/eeprom/Makefile.com b/usr/src/cmd/eeprom/Makefile.com index 248528cc9c..eab53d485d 100644 --- a/usr/src/cmd/eeprom/Makefile.com +++ b/usr/src/cmd/eeprom/Makefile.com @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # # Create default so empty rules don't @@ -41,6 +42,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + LINT_OBJS = $(OBJS:%.o=%.ln) SOURCES = $(OBJS:%.o=%.c) diff --git a/usr/src/cmd/enhance/Makefile b/usr/src/cmd/enhance/Makefile index d555d810ef..8b0e0fbec6 100644 --- a/usr/src/cmd/enhance/Makefile +++ b/usr/src/cmd/enhance/Makefile @@ -23,8 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# +# Copyright (c) 2018, Joyent, Inc. PROG= enhance @@ -41,6 +40,8 @@ CPPFLAGS += -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 \ lint := LINTFLAGS += -ux +SMOFF += all_func_returns + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/eqn/eqn.d/Makefile b/usr/src/cmd/eqn/eqn.d/Makefile index 8b9dfcf422..08c289eb03 100644 --- a/usr/src/cmd/eqn/eqn.d/Makefile +++ b/usr/src/cmd/eqn/eqn.d/Makefile @@ -2,6 +2,8 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. +# include ../../Makefile.cmd @@ -35,6 +37,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all : $(PROG) diff --git a/usr/src/cmd/eqn/neqn.d/Makefile b/usr/src/cmd/eqn/neqn.d/Makefile index 2863de2874..a50bc23501 100644 --- a/usr/src/cmd/eqn/neqn.d/Makefile +++ b/usr/src/cmd/eqn/neqn.d/Makefile @@ -2,6 +2,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include ../../Makefile.cmd @@ -30,6 +31,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-label +# not linted +SMATCH=off + # # for message catalog # diff --git a/usr/src/cmd/etdump/Makefile b/usr/src/cmd/etdump/Makefile index 1ff307b3cd..38b3ab5dd0 100644 --- a/usr/src/cmd/etdump/Makefile +++ b/usr/src/cmd/etdump/Makefile @@ -11,6 +11,7 @@ # # Copyright 2019 Toomas Soome <tsoome@me.com> +# Copyright (c) 2019, Joyent, Inc. # PROG= etdump @@ -19,6 +20,9 @@ SRCS= $(OBJS:%.o=%.c) include ../Makefile.cmd +# comes from FreeBSD upstream +SMOFF += all_func_returns + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/expand/Makefile b/usr/src/cmd/expand/Makefile index 157b7167f5..e6c86c72d1 100644 --- a/usr/src/cmd/expand/Makefile +++ b/usr/src/cmd/expand/Makefile @@ -23,8 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/expand/Makefile -# +# Copyright (c) 2018, Joyent, Inc. PROG= expand unexpand SRCS= $(PROG:=.c) @@ -37,9 +36,11 @@ POFILE= expand.po CLOBBERFILES += expand_cmd.c +SMOFF += signed + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/expr/Makefile b/usr/src/cmd/expr/Makefile index dbc390fce5..08117a45a3 100644 --- a/usr/src/cmd/expr/Makefile +++ b/usr/src/cmd/expr/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG= expr XPG4PROG= expr @@ -38,6 +39,8 @@ include ../Makefile.cmd CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-extra +# "missing type for func" +SMATCH=off $(XPG4) := CFLAGS += -DXPG4 $(XPG6) := CFLAGS += -DXPG6 diff --git a/usr/src/cmd/exstr/Makefile b/usr/src/cmd/exstr/Makefile index 3123493743..b44427a4c7 100644 --- a/usr/src/cmd/exstr/Makefile +++ b/usr/src/cmd/exstr/Makefile @@ -21,6 +21,7 @@ # # # Copyright (c) 1989 by Sun Microsystems, Inc. +# Copyright (c) 2018, Joyent, Inc. # PROG= exstr @@ -29,9 +30,12 @@ include ../Makefile.cmd CERRWARN += -_gcc=-Wno-extra +# "missing type for func" +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/factor/Makefile b/usr/src/cmd/factor/Makefile index 05bccd0c85..0b72a49109 100644 --- a/usr/src/cmd/factor/Makefile +++ b/usr/src/cmd/factor/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG= factor @@ -30,6 +31,9 @@ include ../Makefile.cmd LDLIBS += -lm CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/fcinfo/Makefile b/usr/src/cmd/fcinfo/Makefile index ebe3fc72cd..c21b9a5ed6 100644 --- a/usr/src/cmd/fcinfo/Makefile +++ b/usr/src/cmd/fcinfo/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. COMMONBASE = ../../common @@ -49,6 +49,9 @@ POFILES = fcinfo.po fcinfo-list.po fcadm-list.po printAttrs.po fcoeadm.po CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + ROOTMANIFESTDIR= $(ROOTSVCNETWORK) LDLIBS += -lHBAAPI diff --git a/usr/src/cmd/fdformat/Makefile b/usr/src/cmd/fdformat/Makefile index 8a04df934e..1454ef6ae5 100644 --- a/usr/src/cmd/fdformat/Makefile +++ b/usr/src/cmd/fdformat/Makefile @@ -22,8 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fdformat/Makefile -# +# Copyright (c) 2018, Joyent, Inc. PROG= fdformat @@ -32,6 +31,9 @@ include ../Makefile.cmd LDLIBS += -lvolmgt LINTFLAGS += -um +# not linted +SMATCH=off + .KEEP_STATE: # @@ -39,7 +41,7 @@ LINTFLAGS += -um # $(ROOTPROG) := FILEMODE = 04555 -all: $(PROG) +all: $(PROG) fdformat: fdformat.c $(LINK.c) -o $@ ./fdformat.c $(LDLIBS) diff --git a/usr/src/cmd/fdisk/Makefile b/usr/src/cmd/fdisk/Makefile index ff449b4de5..81f1788fbb 100644 --- a/usr/src/cmd/fdisk/Makefile +++ b/usr/src/cmd/fdisk/Makefile @@ -21,7 +21,7 @@ # # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. # -# +# Copyright (c) 2018, Joyent, Inc. # Makefile for fdisk @@ -34,6 +34,9 @@ include ../Makefile.cmd CPPFLAGS += -D_FILE_OFFSET_BITS=64 +# not linted +SMATCH=off + LDLIBS_i386= -lfdisk LDLIBS_sparc= LDLIBS += -ladm -lefi $(LDLIBS_$(MACH)) diff --git a/usr/src/cmd/ficl/Makefile.com b/usr/src/cmd/ficl/Makefile.com index 6be92a0115..86ea753503 100644 --- a/usr/src/cmd/ficl/Makefile.com +++ b/usr/src/cmd/ficl/Makefile.com @@ -12,6 +12,7 @@ # # Copyright 2016 Toomas Soome <tsoome@me.com> # +# Copyright (c) 2018, Joyent, Inc. PROG= ficl-sys OBJS= main.o @@ -23,6 +24,8 @@ include ../../Makefile.ctf LDLIBS += -lficl-sys -ltecla -lumem CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I$(SRC)/common/ficl +SMOFF += all_func_returns + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/file/Makefile b/usr/src/cmd/file/Makefile index e05f3e4689..7f7da7c2d0 100644 --- a/usr/src/cmd/file/Makefile +++ b/usr/src/cmd/file/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= file XPG4PROG= file @@ -43,6 +44,9 @@ C99LMODE= -Xc99=%all CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-type-limits +# not linted +SMATCH=off + POFILE= file_all.po POFILES= $(SRCS:%.c=%.po) diff --git a/usr/src/cmd/filesync/Makefile b/usr/src/cmd/filesync/Makefile index 23ab3239fe..df62a44193 100644 --- a/usr/src/cmd/filesync/Makefile +++ b/usr/src/cmd/filesync/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= filesync @@ -35,6 +36,9 @@ LDLIBS += -lgen CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + FILEMODE= 0555 .KEEP_STATE: diff --git a/usr/src/cmd/flowstat/Makefile b/usr/src/cmd/flowstat/Makefile index e9efa364e0..c568245899 100644 --- a/usr/src/cmd/flowstat/Makefile +++ b/usr/src/cmd/flowstat/Makefile @@ -22,6 +22,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG=flowstat @@ -38,6 +39,9 @@ LDLIBS += -ldladm -lofmt CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + ROOTCFGDIR= $(ROOTETC)/dladm .KEEP_STATE: diff --git a/usr/src/cmd/fm/eversholt/Makefile.esc.com b/usr/src/cmd/fm/eversholt/Makefile.esc.com index d8dbaf289c..97d684c164 100644 --- a/usr/src/cmd/fm/eversholt/Makefile.esc.com +++ b/usr/src/cmd/fm/eversholt/Makefile.esc.com @@ -17,12 +17,12 @@ # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END -# # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Copyright 2018 RackTop Systems. +# Copyright (c) 2018, Joyent, Inc. # FMADIR = $(SRC)/cmd/fm @@ -51,6 +51,8 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch +SMOFF += all_func_returns + CTFCONVO = $(CTFCONVERT_O) CTFMRG = $(CTFMERGE) -L VERSION -o $@ $(OBJS) diff --git a/usr/src/cmd/fm/fmd/Makefile.fmd b/usr/src/cmd/fm/fmd/Makefile.fmd index 3634df1269..1a23743d95 100644 --- a/usr/src/cmd/fm/fmd/Makefile.fmd +++ b/usr/src/cmd/fm/fmd/Makefile.fmd @@ -21,6 +21,7 @@ # # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2015 RackTop Systems. +# Copyright (c) 2018, Joyent, Inc. # .KEEP_STATE: @@ -123,6 +124,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-clobbered +# not linted +SMATCH=off + $(PROG) := LDFLAGS += -R/usr/lib/fm $(PROG) := LDLIBS += -L$(ROOTLIB)/fm -ltopo -ldiagcode -lsysevent -lsmbios \ -luuid -lnvpair -lexacct -lnsl -lumem -ldevinfo -lfmd_msg diff --git a/usr/src/cmd/fm/fmstat/Makefile.com b/usr/src/cmd/fm/fmstat/Makefile.com index 0c743f8108..97ab83a828 100644 --- a/usr/src/cmd/fm/fmstat/Makefile.com +++ b/usr/src/cmd/fm/fmstat/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. .KEEP_STATE: .SUFFIXES: @@ -47,6 +48,8 @@ LDLIBS += -L$(ROOT)/usr/lib/fm -lfmd_adm LDFLAGS += -R/usr/lib/fm LINTFLAGS += -mnu +SMOFF += signed + .NO_PARALLEL: .PARALLEL: $(OBJS) $(LINTFILES) diff --git a/usr/src/cmd/fm/fmtopo/Makefile.com b/usr/src/cmd/fm/fmtopo/Makefile.com index 7b09bbbd87..d692d463aa 100644 --- a/usr/src/cmd/fm/fmtopo/Makefile.com +++ b/usr/src/cmd/fm/fmtopo/Makefile.com @@ -24,7 +24,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# Copyright (c) 2018, Joyent, Inc. .KEEP_STATE: .SUFFIXES: @@ -45,6 +45,9 @@ LDLIBS += -L$(ROOT)/usr/lib/fm -ltopo -lnvpair LDFLAGS += -R/usr/lib/fm LINTFLAGS += -mnu +# not linted +SMATCH=off + .NO_PARALLEL: .PARALLEL: $(OBJS) $(LINTFILES) diff --git a/usr/src/cmd/fm/modules/common/disk-monitor/Makefile b/usr/src/cmd/fm/modules/common/disk-monitor/Makefile index 4ee7343d45..3acbf7c3df 100644 --- a/usr/src/cmd/fm/modules/common/disk-monitor/Makefile +++ b/usr/src/cmd/fm/modules/common/disk-monitor/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. MODULE = disk-monitor CLASS = common @@ -35,3 +36,6 @@ CFLAGS += -I. -I$(SRC)/lib/fm/topo/modules/common/disk LDLIBS += -lsysevent -lnvpair -lsmbios -lcfgadm -ltopo -luutil -lipmi LDFLAGS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off diff --git a/usr/src/cmd/fm/modules/common/eversholt/Makefile b/usr/src/cmd/fm/modules/common/eversholt/Makefile index c71726062e..0ca385c960 100644 --- a/usr/src/cmd/fm/modules/common/eversholt/Makefile +++ b/usr/src/cmd/fm/modules/common/eversholt/Makefile @@ -25,6 +25,7 @@ # # eft.so (the eversholt DE) # +# Copyright (c) 2018, Joyent, Inc. .KEEP_STATE: @@ -49,6 +50,9 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + $(PROG) := LDFLAGS += -R/usr/lib/fm $(PROG) := LDLIBS += -L$(ROOTLIB)/fm -ltopo diff --git a/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile b/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile index ef2fd7530d..ce58c99d73 100644 --- a/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile +++ b/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. MODULE = fabric-xlate CLASS = common @@ -41,3 +42,6 @@ LDLIBS += -luutil -lxml2 -L$(ROOTLIB)/fm -ltopo CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off diff --git a/usr/src/cmd/fm/modules/common/ip-transport/Makefile b/usr/src/cmd/fm/modules/common/ip-transport/Makefile index 84f01180ab..bafe1caba3 100644 --- a/usr/src/cmd/fm/modules/common/ip-transport/Makefile +++ b/usr/src/cmd/fm/modules/common/ip-transport/Makefile @@ -24,6 +24,7 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. MODULE = ip-transport CLASS = common @@ -33,3 +34,6 @@ include ../../Makefile.plugin LDLIBS += -lsocket -lnsl CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off diff --git a/usr/src/cmd/fm/modules/common/ses-log-transport/Makefile b/usr/src/cmd/fm/modules/common/ses-log-transport/Makefile index eac67a77f9..0188e38a35 100644 --- a/usr/src/cmd/fm/modules/common/ses-log-transport/Makefile +++ b/usr/src/cmd/fm/modules/common/ses-log-transport/Makefile @@ -21,8 +21,8 @@ # #Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. - MODULE = ses-log-transport CLASS = common SRCS = ses_log_transport.c @@ -33,3 +33,6 @@ CFLAGS += $(INCS) LINTFLAGS += $(INCS) LDLIBS += -L$(ROOTLIB)/fm -ltopo -lseslog LDFLAGS += -R/usr/lib/fm + +# not linted +SMATCH=off diff --git a/usr/src/cmd/fmt/Makefile b/usr/src/cmd/fmt/Makefile index cecd4e3c2a..0edd92e70c 100644 --- a/usr/src/cmd/fmt/Makefile +++ b/usr/src/cmd/fmt/Makefile @@ -23,7 +23,7 @@ # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fmt/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= fmt @@ -37,6 +37,9 @@ LDLIBS += -lcmdutils CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/fold/Makefile b/usr/src/cmd/fold/Makefile index 519c39a0e2..7f93bd355a 100644 --- a/usr/src/cmd/fold/Makefile +++ b/usr/src/cmd/fold/Makefile @@ -19,12 +19,10 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= fold @@ -32,9 +30,11 @@ include ../Makefile.cmd CFLAGS += $(CCVERBOSE) +SMOFF += index_overflow + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/format/Makefile b/usr/src/cmd/format/Makefile index 34f25b7cc2..6c9f7781f7 100644 --- a/usr/src/cmd/format/Makefile +++ b/usr/src/cmd/format/Makefile @@ -23,7 +23,7 @@ # Use is subject to license terms. # # Copyright 2015 Nexenta Systems, Inc. All rights reserved. -# +# Copyright (c) 2018, Joyent, Inc. PROG= format @@ -51,6 +51,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-clobbered +# not linted +SMATCH=off + SRCS= $(OBJS:.o=.c) ROOTSYMLINK= $(ROOTETCPROG) diff --git a/usr/src/cmd/fs.d/Makefile b/usr/src/cmd/fs.d/Makefile index 2f5bd31ec7..91f994ebb0 100644 --- a/usr/src/cmd/fs.d/Makefile +++ b/usr/src/cmd/fs.d/Makefile @@ -19,6 +19,7 @@ # CDDL HEADER END # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # Copyright 2015 Nexenta Systems, Inc. All rights reserved. # @@ -87,6 +88,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + $(DFPROG) := LDLIBS += -lcmdutils $(SPPROG) := LDLIBS += -lkstat diff --git a/usr/src/cmd/fs.d/autofs/Makefile b/usr/src/cmd/fs.d/autofs/Makefile index 5fd524a0f8..c91673ad42 100644 --- a/usr/src/cmd/fs.d/autofs/Makefile +++ b/usr/src/cmd/fs.d/autofs/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2015 RackTop Systems. +# Copyright (c) 2018, Joyent, Inc. # FSTYPE= autofs @@ -98,6 +99,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + OBJS= $(AUTOOBJS) $(MOUNTOBJS) $(TYPEOBJS) \ $(SHAREOBJS) $(UNSHAREOBJS) diff --git a/usr/src/cmd/fs.d/hsfs/labelit/Makefile b/usr/src/cmd/fs.d/hsfs/labelit/Makefile index fdf2c43912..4c96122b88 100644 --- a/usr/src/cmd/fs.d/hsfs/labelit/Makefile +++ b/usr/src/cmd/fs.d/hsfs/labelit/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= hsfs LIBPROG= labelit @@ -33,6 +34,9 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + lint := PROG = $(LIBPROG) lint: lint_PROG diff --git a/usr/src/cmd/fs.d/hsfs/mount/Makefile b/usr/src/cmd/fs.d/hsfs/mount/Makefile index 9afcfc72f1..307f3dfa61 100644 --- a/usr/src/cmd/fs.d/hsfs/mount/Makefile +++ b/usr/src/cmd/fs.d/hsfs/mount/Makefile @@ -23,6 +23,7 @@ # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= hsfs LIBPROG= mount @@ -40,3 +41,6 @@ include ../../Makefile.mount include ../../Makefile.mount.targ CERRWARN += -_gcc=-Wno-unused-variable + +# not linted +SMATCH=off diff --git a/usr/src/cmd/fs.d/nfs/clear_locks/Makefile b/usr/src/cmd/fs.d/nfs/clear_locks/Makefile index 0d08fe841c..804e784d08 100644 --- a/usr/src/cmd/fs.d/nfs/clear_locks/Makefile +++ b/usr/src/cmd/fs.d/nfs/clear_locks/Makefile @@ -20,11 +20,10 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= clear_locks @@ -52,9 +51,12 @@ $(POFILE): clear_locks.c CFLAGS += $(CCVERBOSE) +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) diff --git a/usr/src/cmd/fs.d/nfs/dfmounts/Makefile b/usr/src/cmd/fs.d/nfs/dfmounts/Makefile index bd6ae76dd7..35b51671b0 100644 --- a/usr/src/cmd/fs.d/nfs/dfmounts/Makefile +++ b/usr/src/cmd/fs.d/nfs/dfmounts/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs LIBPROG= dfmounts @@ -43,6 +44,9 @@ LDLIBS += -lrpcsvc -lnsl CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses +# unknown type for func +SMATCH = off + $(LIBPROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/nfs/dfshares/Makefile b/usr/src/cmd/fs.d/nfs/dfshares/Makefile index ffda5d11cb..b86545d9e5 100644 --- a/usr/src/cmd/fs.d/nfs/dfshares/Makefile +++ b/usr/src/cmd/fs.d/nfs/dfshares/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs LIBPROG= dfshares @@ -37,6 +38,10 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + + $(LIBPROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/nfs/lockd/Makefile b/usr/src/cmd/fs.d/nfs/lockd/Makefile index 19c459d9f5..e013de8aaa 100644 --- a/usr/src/cmd/fs.d/nfs/lockd/Makefile +++ b/usr/src/cmd/fs.d/nfs/lockd/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # FSTYPE = nfs @@ -45,6 +46,10 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + + $(TYPEPROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/nfs/mount/Makefile b/usr/src/cmd/fs.d/nfs/mount/Makefile index 05cdc4f6da..f20280b634 100644 --- a/usr/src/cmd/fs.d/nfs/mount/Makefile +++ b/usr/src/cmd/fs.d/nfs/mount/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2017, Joyent, Inc. All rights reserved. +# Copyright 2018, Joyent, Inc. All rights reserved. # # cmd/fs.d/nfs/mount/Makefile @@ -50,6 +50,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-address CERRWARN += -_gcc=-Wno-unused-function +# unknown type for func +SMATCH=off + # # Message catalog # diff --git a/usr/src/cmd/fs.d/nfs/mountd/Makefile b/usr/src/cmd/fs.d/nfs/mountd/Makefile index eca0a82911..36d3d4bca4 100644 --- a/usr/src/cmd/fs.d/nfs/mountd/Makefile +++ b/usr/src/cmd/fs.d/nfs/mountd/Makefile @@ -23,6 +23,7 @@ # Copyright 2015 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE = nfs TYPEPROG = mountd @@ -44,6 +45,9 @@ CPPFLAGS += -D_REENTRANT -I../lib CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-switch +# not linted +SMATCH=off + $(TYPEPROG): $(OBJS) $(COMPILE.d) -s $(DSRC) -o $(DOBJ) $(OBJS) $(LINK.c) -o $@ $(DOBJ) $(OBJS) $(LDLIBS) diff --git a/usr/src/cmd/fs.d/nfs/nfs4cbd/Makefile b/usr/src/cmd/fs.d/nfs/nfs4cbd/Makefile index 4c6f4dca16..9743af5165 100644 --- a/usr/src/cmd/fs.d/nfs/nfs4cbd/Makefile +++ b/usr/src/cmd/fs.d/nfs/nfs4cbd/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs TYPEPROG= nfs4cbd @@ -40,6 +41,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-extra +# not linted +SMATCH=off + .KEEP_STATE: all: $(TYPEPROG) diff --git a/usr/src/cmd/fs.d/nfs/nfsd/Makefile b/usr/src/cmd/fs.d/nfs/nfsd/Makefile index 90a77dcbef..384d6a0c66 100644 --- a/usr/src/cmd/fs.d/nfs/nfsd/Makefile +++ b/usr/src/cmd/fs.d/nfs/nfsd/Makefile @@ -21,7 +21,7 @@ # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # -# +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs TYPEPROG= nfsd @@ -42,6 +42,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-extra +# not linted +SMATCH=off + $(TYPEPROG): $(OBJS) $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/nfs/nfslog/Makefile b/usr/src/cmd/fs.d/nfs/nfslog/Makefile index 243574f744..7b2763a8d2 100644 --- a/usr/src/cmd/fs.d/nfs/nfslog/Makefile +++ b/usr/src/cmd/fs.d/nfs/nfslog/Makefile @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs TYPEPROG= nfslogd @@ -42,6 +43,10 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-type-limits + +# not linted +SMATCH=off + CPPFLAGS += -D_FILE_OFFSET_BITS=64 # diff --git a/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile b/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile index 6afd2bb495..5f0af9ef89 100644 --- a/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile +++ b/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile @@ -22,6 +22,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. + FSTYPE = nfs TYPEPROG = nfsmapid @@ -44,6 +46,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + all: $(TYPEPROG) $(TESTPROG) $(TYPEPROG): $(OBJS) $(DSRC) diff --git a/usr/src/cmd/fs.d/nfs/nfsref/Makefile b/usr/src/cmd/fs.d/nfs/nfsref/Makefile index 9f5b8e73a3..749789dc68 100644 --- a/usr/src/cmd/fs.d/nfs/nfsref/Makefile +++ b/usr/src/cmd/fs.d/nfs/nfsref/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fs.d/nfs/nfsref/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= nfsref @@ -36,6 +36,9 @@ SRCS= nfsref.c CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + LDLIBS += -lreparse -lnvpair -lnsl -lumem $(PROG): $(OBJS) diff --git a/usr/src/cmd/fs.d/nfs/nfsstat/Makefile b/usr/src/cmd/fs.d/nfs/nfsstat/Makefile index 1fe48838f6..1b8dc8c9e6 100644 --- a/usr/src/cmd/fs.d/nfs/nfsstat/Makefile +++ b/usr/src/cmd/fs.d/nfs/nfsstat/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fs.d/nfs/nfsstat/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= nfsstat @@ -42,6 +42,10 @@ OBJS += $(STAT_COMMON_OBJS) CPPFLAGS += -I$(STATCOMMONDIR) CERRWARN += -_gcc=-Wno-parentheses + +# not linted +SMATCH=off + LDLIBS += -lkstat -lnsl $(PROG): $(OBJS) diff --git a/usr/src/cmd/fs.d/nfs/rp_basic/Makefile.com b/usr/src/cmd/fs.d/nfs/rp_basic/Makefile.com index 85567a3537..282067be42 100644 --- a/usr/src/cmd/fs.d/nfs/rp_basic/Makefile.com +++ b/usr/src/cmd/fs.d/nfs/rp_basic/Makefile.com @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. LIBRARY = libnfs_basic.a VERS = .1 @@ -44,6 +45,9 @@ LDLIBS += -lc -lnsl CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_REENTRANT -I$(SRC)/cmd/fs.d/nfs/lib +# not linted +SMATCH=off + .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/cmd/fs.d/nfs/rquotad/Makefile b/usr/src/cmd/fs.d/nfs/rquotad/Makefile index e75afe3a9b..8a450f5c35 100644 --- a/usr/src/cmd/fs.d/nfs/rquotad/Makefile +++ b/usr/src/cmd/fs.d/nfs/rquotad/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs TYPEPROG= rquotad @@ -38,6 +39,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable LDLIBS += -lnsl +# unknown type for func +SMATCH=off + $(TYPEPROG): $(OBJS) $(LINK.c) -o $@ $(LDLIBS) $(OBJS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/nfs/showmount/Makefile b/usr/src/cmd/fs.d/nfs/showmount/Makefile index 7974fd5cdc..527c776481 100644 --- a/usr/src/cmd/fs.d/nfs/showmount/Makefile +++ b/usr/src/cmd/fs.d/nfs/showmount/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs LIBPROG= showmount @@ -47,6 +48,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + $(LIBPROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/nfs/statd/Makefile b/usr/src/cmd/fs.d/nfs/statd/Makefile index ad7559a035..c64bbb71ca 100644 --- a/usr/src/cmd/fs.d/nfs/statd/Makefile +++ b/usr/src/cmd/fs.d/nfs/statd/Makefile @@ -30,6 +30,7 @@ # # Copyright (c) 2016 by Delphix. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs TYPEPROG= statd @@ -43,6 +44,9 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LOCAL= sm_svc.o sm_proc.o sm_statd.o OBJS= $(LOCAL) selfcheck.o daemon.o smfcfg.o diff --git a/usr/src/cmd/fs.d/nfs/tests/Makefile b/usr/src/cmd/fs.d/nfs/tests/Makefile index 1229b37f3e..329c9ca0b6 100644 --- a/usr/src/cmd/fs.d/nfs/tests/Makefile +++ b/usr/src/cmd/fs.d/nfs/tests/Makefile @@ -23,7 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fs.d/nfs/tests/Makefile +# Copyright (c) 2018, Joyent, Inc. FSTYPE= nfs LIBPROG= test_svc_tp_create @@ -35,6 +35,9 @@ SRCS= $(LIBPROG).c CFLAGS += $(CCVERBOSE) +# not linted +SMATCH=off + LDLIBS += -lnsl -lsocket # message catalog diff --git a/usr/src/cmd/fs.d/smbclnt/smbiod-svc/Makefile b/usr/src/cmd/fs.d/smbclnt/smbiod-svc/Makefile index a5dbf68bd9..90a7778386 100644 --- a/usr/src/cmd/fs.d/smbclnt/smbiod-svc/Makefile +++ b/usr/src/cmd/fs.d/smbclnt/smbiod-svc/Makefile @@ -22,10 +22,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # - -# -# cmd/fs.d/smbclnt/smbiod-svc/Makefile -# +# Copyright (c) 2018, Joyent, Inc. FSTYPE= smbfs TYPEPROG= smbiod-svc @@ -42,6 +39,9 @@ CSTD= $(CSTD_GNU99) CPPFLAGS += -I$(SRC)/lib/libsmbfs \ -I$(SRC)/uts/common/smbclnt -I$(SRC)/uts/common +# not linted +SMATCH=off + # Debugging ${NOT_RELEASE_BUILD} CPPFLAGS += -DDEBUG diff --git a/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile b/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile index 7acbf30f86..0b1f468a2b 100644 --- a/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile +++ b/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # # @@ -39,13 +40,14 @@ POFILE= $(TYPEPROG).po CFLAGS += $(CCVERBOSE) CSTD= $(CSTD_GNU99) -# This is a multi-thread program but Nevada -# no longer needs -lthread LDLIBS += -lsmbfs -lumem CPPFLAGS += -I$(SRC)/lib/libsmbfs \ -I$(SRC)/uts/common/smbclnt -I$(SRC)/uts/common +# not linted +SMATCH=off + # Debugging ${NOT_RELEASE_BUILD} CPPFLAGS += -DDEBUG diff --git a/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile b/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile index f15dcc8f67..5794a07956 100644 --- a/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile +++ b/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile @@ -24,6 +24,7 @@ # Use is subject to license terms. # # Copyright 2013 Nexenta Systems, Inc. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # # @@ -52,6 +53,9 @@ LDLIBS += -lmlrpc -lsmbfs -lnsl CPPFLAGS += -I$(SRC)/lib/libsmbfs \ -I$(SRC)/uts/common/smbclnt -I$(SRC)/uts/common +# not linted +SMATCH=off + # Debugging ${NOT_RELEASE_BUILD} CPPFLAGS += -DDEBUG diff --git a/usr/src/cmd/fs.d/udfs/fsck/Makefile b/usr/src/cmd/fs.d/udfs/fsck/Makefile index f3870fba38..a5c12a6baa 100644 --- a/usr/src/cmd/fs.d/udfs/fsck/Makefile +++ b/usr/src/cmd/fs.d/udfs/fsck/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1999 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= udfs LIBPROG= fsck @@ -40,6 +41,9 @@ UDFSOBJS= udfslib.o CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + OBJS= $(FSCKOBJS) $(UDFSOBJS) SRCS= $(FSCKSRCS) $(UDFSSRCS) ../mkfs/udfslib.c diff --git a/usr/src/cmd/fs.d/udfs/fsdb/Makefile b/usr/src/cmd/fs.d/udfs/fsdb/Makefile index 3c8ea7cc87..5c17537f20 100644 --- a/usr/src/cmd/fs.d/udfs/fsdb/Makefile +++ b/usr/src/cmd/fs.d/udfs/fsdb/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Copyright 2017, Joyent Inc. +# Copyright (c) 2018, Joyent, Inc. # FSTYPE= udfs @@ -51,6 +51,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + SRCS= fsdb.c ud_lib.c fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILES) diff --git a/usr/src/cmd/fs.d/udfs/mkfs/Makefile b/usr/src/cmd/fs.d/udfs/mkfs/Makefile index e235f01963..078f90c5fb 100644 --- a/usr/src/cmd/fs.d/udfs/mkfs/Makefile +++ b/usr/src/cmd/fs.d/udfs/mkfs/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1999,2001 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= udfs LIBPROG= mkfs @@ -48,6 +49,9 @@ UDFSOBJS= CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + OBJS= $(MKFSOBJS) $(UDFSOBJS) SRCS= $(OBJS:%.o=%.c) diff --git a/usr/src/cmd/fs.d/ufs/df/Makefile b/usr/src/cmd/fs.d/ufs/df/Makefile index fc76d7ca8e..a59dd5de7d 100644 --- a/usr/src/cmd/fs.d/ufs/df/Makefile +++ b/usr/src/cmd/fs.d/ufs/df/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= df @@ -40,6 +41,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + # for messaging catalogue file # POFILE= df.po diff --git a/usr/src/cmd/fs.d/ufs/edquota/Makefile b/usr/src/cmd/fs.d/ufs/edquota/Makefile index 1f29704147..a33c171584 100644 --- a/usr/src/cmd/fs.d/ufs/edquota/Makefile +++ b/usr/src/cmd/fs.d/ufs/edquota/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1989,1996 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= edquota @@ -37,5 +38,8 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE CERRWARN += -_gcc=-Wno-parentheses lint: lint_PROG +# not linted +SMATCH=off + $(ROOTUSRSBIN)/$(LIBPROG): -$(RM) $@; $(SYMLINK) $(LINKVALUE) $@ diff --git a/usr/src/cmd/fs.d/ufs/ff/Makefile b/usr/src/cmd/fs.d/ufs/ff/Makefile index 09c79c2688..a36af880e0 100644 --- a/usr/src/cmd/fs.d/ufs/ff/Makefile +++ b/usr/src/cmd/fs.d/ufs/ff/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1989,1996 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= ff @@ -41,6 +42,9 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + $(LIBPROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/ufs/fsck/Makefile b/usr/src/cmd/fs.d/ufs/fsck/Makefile index 9562fdedb2..cc3bd8dd12 100644 --- a/usr/src/cmd/fs.d/ufs/fsck/Makefile +++ b/usr/src/cmd/fs.d/ufs/fsck/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= fsck @@ -51,6 +52,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + $(LIBPROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/ufs/fsdb/Makefile b/usr/src/cmd/fs.d/ufs/fsdb/Makefile index 05dfa205dd..64527b4e5f 100644 --- a/usr/src/cmd/fs.d/ufs/fsdb/Makefile +++ b/usr/src/cmd/fs.d/ufs/fsdb/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1989,2001 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= fsdb @@ -37,6 +38,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + SRCS= $(LIBPROG).c lint: lint_SRCS diff --git a/usr/src/cmd/fs.d/ufs/fssnap/Makefile b/usr/src/cmd/fs.d/ufs/fssnap/Makefile index 155ad227e8..c1dfb654c2 100644 --- a/usr/src/cmd/fs.d/ufs/fssnap/Makefile +++ b/usr/src/cmd/fs.d/ufs/fssnap/Makefile @@ -21,8 +21,9 @@ # # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= fssnap @@ -43,6 +44,10 @@ CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off + LDLIBS += -lkstat -ldevinfo # message catalog diff --git a/usr/src/cmd/fs.d/ufs/labelit/Makefile b/usr/src/cmd/fs.d/ufs/labelit/Makefile index 346d76baaf..d4747a5016 100644 --- a/usr/src/cmd/fs.d/ufs/labelit/Makefile +++ b/usr/src/cmd/fs.d/ufs/labelit/Makefile @@ -20,12 +20,10 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1989,1996,2001 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/fs.d/ufs/labelit/Makefile +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= labelit @@ -35,6 +33,9 @@ include ../../Makefile.fstype CPPFLAGS += -D_LARGEFILE64_SOURCE +# not linted +SMATCH=off + lint := PROG=$(LIBPROG) lint: lint_PROG diff --git a/usr/src/cmd/fs.d/ufs/lockfs/Makefile b/usr/src/cmd/fs.d/ufs/lockfs/Makefile index 0429ee74ce..9e1bdc9af5 100644 --- a/usr/src/cmd/fs.d/ufs/lockfs/Makefile +++ b/usr/src/cmd/fs.d/ufs/lockfs/Makefile @@ -20,12 +20,10 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1991,1996,2001 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/fs.d/ufs/lockfs/Makefile +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= lockfs @@ -38,6 +36,8 @@ include ../../Makefile.fstype CPPFLAGS += -D_LARGEFILE64_SOURCE +SMOFF += all_func_returns + lint: lint_PROG $(ROOTUSRSBIN)/$(LIBPROG): diff --git a/usr/src/cmd/fs.d/ufs/newfs/Makefile b/usr/src/cmd/fs.d/ufs/newfs/Makefile index e740669879..82e10b3aaf 100644 --- a/usr/src/cmd/fs.d/ufs/newfs/Makefile +++ b/usr/src/cmd/fs.d/ufs/newfs/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= newfs @@ -38,6 +39,9 @@ LDLIBS += -ladm -lefi CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + OBJS= $(LIBPROG).o $(FSLIB) SRCS= $(LIBPROG).c $(FSLIBSRC) diff --git a/usr/src/cmd/fs.d/ufs/quot/Makefile b/usr/src/cmd/fs.d/ufs/quot/Makefile index d155cc0b8e..45ffe6b56c 100644 --- a/usr/src/cmd/fs.d/ufs/quot/Makefile +++ b/usr/src/cmd/fs.d/ufs/quot/Makefile @@ -20,12 +20,10 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fs.d/ufs/quot/Makefile +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= quot @@ -40,6 +38,9 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE CFLAGS += $(CCVERBOSE) LDLIBS += -ladm +# not linted +SMATCH=off + lint := PROG= $(LIBPROG) lint: lint_PROG diff --git a/usr/src/cmd/fs.d/ufs/quota/Makefile b/usr/src/cmd/fs.d/ufs/quota/Makefile index 3c2b6bc313..b737d263a7 100644 --- a/usr/src/cmd/fs.d/ufs/quota/Makefile +++ b/usr/src/cmd/fs.d/ufs/quota/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fs.d/ufs/quota/Makefile +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= quota @@ -43,6 +43,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + FILEMODE= 04555 $(LIBPROG): $(OBJS) diff --git a/usr/src/cmd/fs.d/ufs/quotacheck/Makefile b/usr/src/cmd/fs.d/ufs/quotacheck/Makefile index cb302325e4..35efa4536f 100644 --- a/usr/src/cmd/fs.d/ufs/quotacheck/Makefile +++ b/usr/src/cmd/fs.d/ufs/quotacheck/Makefile @@ -23,6 +23,7 @@ # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= quotacheck @@ -42,6 +43,9 @@ SRCS= $(OBJS:.o=.c) CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-type-limits +# not linted +SMATCH=off + lint: lint_PROG $(FSOBJS): $(FSSRCS) diff --git a/usr/src/cmd/fs.d/ufs/quotaon/Makefile b/usr/src/cmd/fs.d/ufs/quotaon/Makefile index 40949dd5d9..d558ce9149 100644 --- a/usr/src/cmd/fs.d/ufs/quotaon/Makefile +++ b/usr/src/cmd/fs.d/ufs/quotaon/Makefile @@ -22,7 +22,7 @@ # Use is subject to license terms. # Copyright 2015 Nexenta Systems, Inc. All rights reserved. # -# cmd/fs.d/ufs/quotaon/Makefile +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= quotaon @@ -43,6 +43,9 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + lint: lint_PROG $(ROOTLIBFSTYPE)/$(QUOTAOFF): $(ROOTLIBFSTYPE)/$(LIBPROG) diff --git a/usr/src/cmd/fs.d/ufs/repquota/Makefile b/usr/src/cmd/fs.d/ufs/repquota/Makefile index 600ca6b373..4bb399e549 100644 --- a/usr/src/cmd/fs.d/ufs/repquota/Makefile +++ b/usr/src/cmd/fs.d/ufs/repquota/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1989,1996 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= repquota @@ -38,6 +39,9 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + lint: lint_PROG $(ROOTUSRSBIN)/$(LIBPROG): diff --git a/usr/src/cmd/fs.d/ufs/tunefs/Makefile b/usr/src/cmd/fs.d/ufs/tunefs/Makefile index 858ea7c3d3..ba6df6c8f5 100644 --- a/usr/src/cmd/fs.d/ufs/tunefs/Makefile +++ b/usr/src/cmd/fs.d/ufs/tunefs/Makefile @@ -23,6 +23,7 @@ # Copyright (c) 1989,1996, by Sun Microsystems, Inc. # All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= tunefs @@ -39,6 +40,9 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + lint: lint_PROG $(ROOTUSRSBIN)/$(LIBPROG): FRC diff --git a/usr/src/cmd/fs.d/ufs/volcopy/Makefile b/usr/src/cmd/fs.d/ufs/volcopy/Makefile index 9da5b17da5..9e767c6561 100644 --- a/usr/src/cmd/fs.d/ufs/volcopy/Makefile +++ b/usr/src/cmd/fs.d/ufs/volcopy/Makefile @@ -23,6 +23,7 @@ # Copyright 1989,2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. FSTYPE= ufs LIBPROG= volcopy @@ -34,6 +35,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lmapmalloc # for messaging catalog diff --git a/usr/src/cmd/fwflash/Makefile.com b/usr/src/cmd/fwflash/Makefile.com index 5f0873b244..6aecb4abf0 100644 --- a/usr/src/cmd/fwflash/Makefile.com +++ b/usr/src/cmd/fwflash/Makefile.com @@ -21,8 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/fwflash/Makefile.com -# +# Copyright (c) 2018, Joyent, Inc. # # common rules for $SRC/cmd/fwflash @@ -32,6 +31,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + ROOTUSR= $(ROOT)/usr ROOTUSRINCLD= $(ROOTUSR)/include ROOTUSRINCLDFWFLASH= $(ROOTUSRINCLD)/fwflash diff --git a/usr/src/cmd/gencat/Makefile b/usr/src/cmd/gencat/Makefile index f5ccbe0e45..0c35c6cf76 100644 --- a/usr/src/cmd/gencat/Makefile +++ b/usr/src/cmd/gencat/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG= gencat @@ -33,6 +34,9 @@ include ../Makefile.cmd CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-value +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/grpck/Makefile b/usr/src/cmd/grpck/Makefile index 3a06b0d9cd..e140a3b7c7 100644 --- a/usr/src/cmd/grpck/Makefile +++ b/usr/src/cmd/grpck/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1990 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG= grpck @@ -29,6 +30,9 @@ include ../Makefile.cmd CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + RELUSRSBIN= ../usr/sbin ROOTSYMLINK= $(ROOTETC)/$(PROG) diff --git a/usr/src/cmd/gss/gsscred/Makefile b/usr/src/cmd/gss/gsscred/Makefile index 84b70d0d32..7442907770 100644 --- a/usr/src/cmd/gss/gsscred/Makefile +++ b/usr/src/cmd/gss/gsscred/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. SBINPROG = gsscred @@ -46,9 +47,12 @@ ROOTBINPROG= $(BINPROG:%=$(ROOTBIN)/%) COPTFLAG += $(XESS) $(INCDIRS) $(LIBPATH) +# not linted +SMATCH=off + LDLIBS += -lgss -$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50 +$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50 .KEEP_STATE: diff --git a/usr/src/cmd/gss/gssd/Makefile b/usr/src/cmd/gss/gssd/Makefile index 11d1a23494..cb03db28a1 100644 --- a/usr/src/cmd/gss/gssd/Makefile +++ b/usr/src/cmd/gss/gssd/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. TESTPROG = gssdtest @@ -37,7 +38,7 @@ GSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \ GD_OBJS = gssd_svc.o GC_OBJS = gssd_clnt.o -G_OBJS = gssd_xdr.o +G_OBJS = gssd_xdr.o GSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS) GSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS) @@ -68,13 +69,16 @@ ROOTLIB= $(ROOT)/usr/lib/gss DIRS= $(ROOTLIB) CPPFLAGS += -I$(SRC)/uts/common/gssapi/include -COPTFLAG += $(XESS) #-I$(KINCDIR) +COPTFLAG += $(XESS) #-I$(KINCDIR) CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lgss -lnsl gssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) diff --git a/usr/src/cmd/iconv/Makefile b/usr/src/cmd/iconv/Makefile index f4fd3c3010..4c776b88a0 100644 --- a/usr/src/cmd/iconv/Makefile +++ b/usr/src/cmd/iconv/Makefile @@ -11,7 +11,7 @@ # # Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# Copyright 2017 Joyent Inc. +# Copyright (c) 2018, Joyent, Inc. # PROG=iconv @@ -31,6 +31,9 @@ $(RELEASE_BUILD) CPPFLAGS += -DNDEBUG CERRWARN += -_gcc=-Wno-unused-label +# not linted +SMATCH=off + CLEANFILES = $(OBJS) parser.tab.c parser.tab.h CLOBBERFILES = $(PROG) $(POFILE) PIFILES = $(OBJS:%.o=%.i) diff --git a/usr/src/cmd/idmap/idmap/Makefile b/usr/src/cmd/idmap/idmap/Makefile index 17e3e1574d..e8d87e4d9c 100644 --- a/usr/src/cmd/idmap/idmap/Makefile +++ b/usr/src/cmd/idmap/idmap/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG = idmap CLIENTOBJS = idmap.o idmap_engine.o namemaps.o @@ -41,6 +42,9 @@ CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + POFILE = $(PROG)_all.po LDLIBS += -lidmap -ladutils -lsldap -lldap FILEMODE = 0555 diff --git a/usr/src/cmd/idmap/idmapd/Makefile b/usr/src/cmd/idmap/idmapd/Makefile index b0d03278ca..4b2c59b59d 100644 --- a/usr/src/cmd/idmap/idmapd/Makefile +++ b/usr/src/cmd/idmap/idmapd/Makefile @@ -22,6 +22,7 @@ # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2014 Nexenta Systems, Inc. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG = idmapd MANIFEST = idmap.xml @@ -63,6 +64,9 @@ CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + TEXT_DOMAIN = SUNW_OST_OSLIB XGETTEXT = $(GNUXGETTEXT) XGETFLAGS = --foreign-user --strict -n -E --width=72 \ diff --git a/usr/src/cmd/init/Makefile b/usr/src/cmd/init/Makefile index 665e8b8e59..58d8e966a2 100644 --- a/usr/src/cmd/init/Makefile +++ b/usr/src/cmd/init/Makefile @@ -23,6 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= init ROOTFS_PROG= $(PROG) @@ -38,6 +39,9 @@ CERRWARN += -_gcc=-Wno-uninitialized LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 CLOBBERFILES= $(STATIC) +# needs work +SMATCH=off + .KEEP_STATE: all: $(ROOTFS_PROG) diff --git a/usr/src/cmd/ipf/Makefile.ipf b/usr/src/cmd/ipf/Makefile.ipf index fa151be780..f960a477a2 100644 --- a/usr/src/cmd/ipf/Makefile.ipf +++ b/usr/src/cmd/ipf/Makefile.ipf @@ -22,8 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#cmd/ipf/Makefile.ipf -# +# Copyright (c) 2018, Joyent, Inc. LIBIPF= ../../lib/$(MACH)/libipf.a @@ -41,3 +40,7 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-empty-body + +# not linted +SMATCH=off + diff --git a/usr/src/cmd/iscsiadm/Makefile b/usr/src/cmd/iscsiadm/Makefile index 0249e9d347..f515f892c5 100644 --- a/usr/src/cmd/iscsiadm/Makefile +++ b/usr/src/cmd/iscsiadm/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. PROG = iscsiadm OBJS = cmdparse.o sun_ima.o iscsiadm_main.o @@ -43,6 +43,9 @@ CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + FILEMODE= 0555 .KEEP_STATE: diff --git a/usr/src/cmd/isns/isnsadm/Makefile b/usr/src/cmd/isns/isnsadm/Makefile index e121b27ff0..e40079b4ef 100644 --- a/usr/src/cmd/isns/isnsadm/Makefile +++ b/usr/src/cmd/isns/isnsadm/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = isnsadm SRCS = cmdparse.c isnsadm.c isnsadm_msg.c @@ -40,6 +41,9 @@ LINTFLAGS += -xerroff=E_BAD_FORMAT_STR2 CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/isns/isnsd/Makefile b/usr/src/cmd/isns/isnsd/Makefile index f104960808..0cfabc0cfb 100644 --- a/usr/src/cmd/isns/isnsd/Makefile +++ b/usr/src/cmd/isns/isnsd/Makefile @@ -25,7 +25,7 @@ # # Copyright (c) 2012 by Delphix. All rights reserved. -# Copyright 2017 Joyent, Inc. +# Copyright (c) 2018, Joyent, Inc. # PROG = isns @@ -64,6 +64,9 @@ CERRWARN += -_gcc=-Wno-ignored-qualifiers CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + CLOBBERFILES += $(DTRACE_HEADER) obj.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR diff --git a/usr/src/cmd/keyserv/Makefile b/usr/src/cmd/keyserv/Makefile index 0c26bd4cca..f787415ab9 100644 --- a/usr/src/cmd/keyserv/Makefile +++ b/usr/src/cmd/keyserv/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. SBINPROG = keyserv newkey BINPROG = keylogout keylogin domainname chkey @@ -74,6 +75,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-address CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + LDLIBS += -lnsl chkey := LDLIBS += -lsldap keyserv := LDLIBS += -lmp diff --git a/usr/src/cmd/krb5/kadmin/cli/Makefile b/usr/src/cmd/krb5/kadmin/cli/Makefile index ea7dc52f6d..e74a5ce3ff 100644 --- a/usr/src/cmd/krb5/kadmin/cli/Makefile +++ b/usr/src/cmd/krb5/kadmin/cli/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kadmin kadmin.local SHFILES= k5srvutil @@ -37,6 +38,8 @@ CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable +SMATCH=off + COPTFLAG += $(XESS) #-I$(KINCDIR) SHAREDLIBS = -lmech_krb5 -lss diff --git a/usr/src/cmd/krb5/kadmin/dbutil/Makefile b/usr/src/cmd/krb5/kadmin/dbutil/Makefile index 9590430b9c..dcf80c679c 100644 --- a/usr/src/cmd/krb5/kadmin/dbutil/Makefile +++ b/usr/src/cmd/krb5/kadmin/dbutil/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kdb5_util @@ -40,6 +41,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb \ -lmech_krb5 -lnsl diff --git a/usr/src/cmd/krb5/kadmin/kclient/Makefile b/usr/src/cmd/krb5/kadmin/kclient/Makefile index a5faf8b1ea..bf766992c3 100644 --- a/usr/src/cmd/krb5/kadmin/kclient/Makefile +++ b/usr/src/cmd/krb5/kadmin/kclient/Makefile @@ -22,6 +22,7 @@ # # Makefile for Kerberos client-install utility. # +# Copyright (c) 2018, Joyent, Inc. PROG= ksetpw \ kdyndns \ @@ -64,6 +65,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + ksetpw:= LDFLAGS += $(KRUNPATH) kdyndns:= LDFLAGS += -R/usr/lib/smbsrv ksmb:= LDFLAGS += -R/usr/lib/smbsrv diff --git a/usr/src/cmd/krb5/kadmin/kdcmgr/Makefile b/usr/src/cmd/krb5/kadmin/kdcmgr/Makefile index 3e5e1e4d86..47bbc0ab43 100644 --- a/usr/src/cmd/krb5/kadmin/kdcmgr/Makefile +++ b/usr/src/cmd/krb5/kadmin/kdcmgr/Makefile @@ -21,6 +21,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kdcmgr KLPROG= klookup @@ -37,6 +38,9 @@ POFILE= $(SSRCS:%.sh=%.po) CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lresolv -lnsl CLOBBERFILES += $(KLPROG) diff --git a/usr/src/cmd/krb5/kadmin/kpasswd/Makefile b/usr/src/cmd/krb5/kadmin/kpasswd/Makefile index 7ace844269..7e8a5d970d 100644 --- a/usr/src/cmd/krb5/kadmin/kpasswd/Makefile +++ b/usr/src/cmd/krb5/kadmin/kpasswd/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kpasswd @@ -35,6 +36,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) LDLIBS += -L $(KRB5LIBDIR) LDLIBS += $(KMECHLIB) $(KCLNTLIB) diff --git a/usr/src/cmd/krb5/kadmin/ktutil/Makefile b/usr/src/cmd/krb5/kadmin/ktutil/Makefile index 652f88110c..06ae6585b3 100644 --- a/usr/src/cmd/krb5/kadmin/ktutil/Makefile +++ b/usr/src/cmd/krb5/kadmin/ktutil/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= ktutil @@ -28,6 +29,9 @@ COPTFLAG += $(XESS) #-I$(KINCDIR) CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) LDLIBS += $(KMECHLIB) $(ROOT)$(KERBLIBDIR)/libss.so diff --git a/usr/src/cmd/krb5/kadmin/server/Makefile b/usr/src/cmd/krb5/kadmin/server/Makefile index 6e8e7c25f9..9bb3366ffc 100644 --- a/usr/src/cmd/krb5/kadmin/server/Makefile +++ b/usr/src/cmd/krb5/kadmin/server/Makefile @@ -2,6 +2,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kadmind MANIFEST= kadmin.xml @@ -47,6 +48,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) LDLIBS += -lgss -L$(KRB5LIB) \ -lmech_krb5 -lkadm5srv -lkdb -lnsl -lresolv -lbsm -lpam -lsocket diff --git a/usr/src/cmd/krb5/kdestroy/Makefile b/usr/src/cmd/krb5/kdestroy/Makefile index fe8cb0f058..7040c504b9 100644 --- a/usr/src/cmd/krb5/kdestroy/Makefile +++ b/usr/src/cmd/krb5/kdestroy/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kdestroy @@ -15,6 +16,9 @@ include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + POFILE = kdestroy.po POFILES = generic.po diff --git a/usr/src/cmd/krb5/kinit/Makefile b/usr/src/cmd/krb5/kinit/Makefile index 8aaaac2990..2d3327f269 100644 --- a/usr/src/cmd/krb5/kinit/Makefile +++ b/usr/src/cmd/krb5/kinit/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kinit @@ -17,6 +18,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + POFILE = kinit.po POFILES = generic.po diff --git a/usr/src/cmd/krb5/klist/Makefile b/usr/src/cmd/krb5/klist/Makefile index 4485ade155..057f73e07d 100644 --- a/usr/src/cmd/krb5/klist/Makefile +++ b/usr/src/cmd/krb5/klist/Makefile @@ -2,7 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. PROG= klist @@ -28,6 +28,9 @@ LDFLAGS += $(KRUNPATH) LDLIBS += $(KMECHLIB) CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + $(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50 .KEEP_STATE: diff --git a/usr/src/cmd/krb5/kproplog/Makefile b/usr/src/cmd/krb5/kproplog/Makefile index 6cade7d181..1672cdbf85 100644 --- a/usr/src/cmd/krb5/kproplog/Makefile +++ b/usr/src/cmd/krb5/kproplog/Makefile @@ -2,6 +2,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = kproplog @@ -37,6 +38,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + all: $(PROG) $(PROG): $(OBJS) $(DERIVED_OBJS) diff --git a/usr/src/cmd/krb5/krb5kdc/Makefile b/usr/src/cmd/krb5/krb5kdc/Makefile index ac3e00b0f3..95cad3e081 100644 --- a/usr/src/cmd/krb5/krb5kdc/Makefile +++ b/usr/src/cmd/krb5/krb5kdc/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= krb5kdc MANIFEST= krb5kdc.xml @@ -56,6 +57,9 @@ CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) LDLIBS += -L$(ROOT_KLIBDIR) -L$(KRB5LIB) \ -lmech_krb5 -lkdb -lkadm5srv -lnsl -lsocket -lbsm -lc diff --git a/usr/src/cmd/krb5/kwarn/Makefile b/usr/src/cmd/krb5/kwarn/Makefile index 7dc7c8dc7a..977631646e 100644 --- a/usr/src/cmd/krb5/kwarn/Makefile +++ b/usr/src/cmd/krb5/kwarn/Makefile @@ -23,6 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. TESTPROG = kwarndtest @@ -56,6 +57,9 @@ CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \ -I$(SRC)/lib/gss_mechs/mech_krb5 \ -I$(SRC)/lib/gss_mechs/mech_krb5/include \ diff --git a/usr/src/cmd/krb5/ldap_util/Makefile b/usr/src/cmd/krb5/ldap_util/Makefile index 261ef5e89e..bdcc3197b0 100644 --- a/usr/src/cmd/krb5/ldap_util/Makefile +++ b/usr/src/cmd/krb5/ldap_util/Makefile @@ -22,6 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= kdb5_ldap_util @@ -65,6 +66,9 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb -lkdb_ldap \ -lmech_krb5 diff --git a/usr/src/cmd/krb5/slave/Makefile b/usr/src/cmd/krb5/slave/Makefile index ffae1e2c8b..5b29e30459 100644 --- a/usr/src/cmd/krb5/slave/Makefile +++ b/usr/src/cmd/krb5/slave/Makefile @@ -2,6 +2,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG1=kprop PROG2=kpropd @@ -63,6 +64,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) LDLIBS += -lmech_krb5 -lsocket $(PROG1) := LDLIBS += -L$(KRB5LIB) -lkadm5srv diff --git a/usr/src/cmd/ksh/Makefile.com b/usr/src/cmd/ksh/Makefile.com index 8716f4eb9d..9f6b431e1f 100644 --- a/usr/src/cmd/ksh/Makefile.com +++ b/usr/src/cmd/ksh/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. SHELL=/usr/bin/ksh93 @@ -62,6 +63,9 @@ CFLAGS64 += \ pmain.o := CERRWARN += -_gcc=-Wno-implicit-function-declaration pmain.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED +# not linted +SMATCH=off + .KEEP_STATE: %.o: $(LIBSHELLSRC)/%.c diff --git a/usr/src/cmd/ksh/builtins/Makefile b/usr/src/cmd/ksh/builtins/Makefile index e4c0e8aa7a..1033c6cdd3 100644 --- a/usr/src/cmd/ksh/builtins/Makefile +++ b/usr/src/cmd/ksh/builtins/Makefile @@ -23,10 +23,10 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # - -# # Copyright 2010 Nexenta Systems, Inc. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. +# PROG= alias ALIASPROG= \ @@ -93,6 +93,9 @@ $(SPARC_BLD)include ../../Makefile.cmd.64 FILEMODE= 555 CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/last/Makefile b/usr/src/cmd/last/Makefile index 82cbb69386..129063ab1d 100644 --- a/usr/src/cmd/last/Makefile +++ b/usr/src/cmd/last/Makefile @@ -21,8 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/last/Makefile -# +# Copyright (c) 2018, Joyent, Inc. PROG= last UTMPS= wtmpx @@ -33,6 +32,9 @@ ETCTOVARADM= ../var/adm include ../Makefile.cmd +# not linted +SMATCH=off + $(ROOTUTMPS):= FILEMODE= 644 $(ROOTADM)/%: % diff --git a/usr/src/cmd/ldap/Makefile.com b/usr/src/cmd/ldap/Makefile.com index 33dd225325..ef207e6ffd 100644 --- a/usr/src/cmd/ldap/Makefile.com +++ b/usr/src/cmd/ldap/Makefile.com @@ -20,6 +20,7 @@ # # # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # # cmd/ldap/Makefile.com # Native LDAP II commands (makestyle clean). @@ -89,6 +90,9 @@ CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + all:= TARGET= all install:= TARGET= install clean:= TARGET= clean diff --git a/usr/src/cmd/ldapcachemgr/Makefile b/usr/src/cmd/ldapcachemgr/Makefile index 5a5b08ea3d..b396397820 100644 --- a/usr/src/cmd/ldapcachemgr/Makefile +++ b/usr/src/cmd/ldapcachemgr/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= ldap_cachemgr @@ -55,6 +56,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + # Message files POFILE= ldap_cachemgr.po POFILES= ${OBJS:%.o=%.po} diff --git a/usr/src/cmd/listen/Makefile b/usr/src/cmd/listen/Makefile index 902064e388..d37edf6d6c 100644 --- a/usr/src/cmd/listen/Makefile +++ b/usr/src/cmd/listen/Makefile @@ -23,6 +23,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. + PROG= listen nlps_server DBGOBJ = doprnt.o @@ -63,6 +65,9 @@ CERRWARN += -_gcc=-Wno-empty-body CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + $(LIBSAFD)/% : % $(INS.file) diff --git a/usr/src/cmd/loadkeys/Makefile b/usr/src/cmd/loadkeys/Makefile index 53f6ec8787..df0c686088 100644 --- a/usr/src/cmd/loadkeys/Makefile +++ b/usr/src/cmd/loadkeys/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= loadkeys dumpkeys sparc_SUBDIRS= type_4 type_6 type_101 @@ -42,6 +43,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + CLOBBERFILES = $(PROG) loadkeys.c .KEEP_STATE: diff --git a/usr/src/cmd/lockstat/Makefile.com b/usr/src/cmd/lockstat/Makefile.com index 54ec4d5853..7e8ee6cf6d 100644 --- a/usr/src/cmd/lockstat/Makefile.com +++ b/usr/src/cmd/lockstat/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= lockstat OBJS= lockstat.o sym.o @@ -33,6 +34,9 @@ LDLIBS += -lelf -lkstat -ldtrace CFLAGS += $(CCVERBOSE) CFLAGS64 += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized + +SMOFF += index_overflow + LINTFLAGS += -xerroff=E_SEC_SPRINTF_UNBOUNDED_COPY LINTFLAGS64 += -xerroff=E_SEC_SPRINTF_UNBOUNDED_COPY diff --git a/usr/src/cmd/lofiadm/Makefile b/usr/src/cmd/lofiadm/Makefile index 07d01206a2..462488cd35 100644 --- a/usr/src/cmd/lofiadm/Makefile +++ b/usr/src/cmd/lofiadm/Makefile @@ -23,6 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= lofiadm OBJS= main.o utils.o @@ -30,7 +31,7 @@ LZMAOBJS= LzmaEnc.o LzFind.o SRCS= $(OBJS:%.o=%.c) -POFILES= $(OBJS:%.o=%.po) +POFILES= $(OBJS:%.o=%.po) include ../Makefile.cmd @@ -40,6 +41,9 @@ LDLIBS += -ldevinfo -lpkcs11 -lcryptoutil CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 .KEEP_STATE: diff --git a/usr/src/cmd/look/Makefile b/usr/src/cmd/look/Makefile index 6ba55dd43b..afe2a58dc7 100644 --- a/usr/src/cmd/look/Makefile +++ b/usr/src/cmd/look/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG= look DATADIR= dict @@ -37,6 +38,9 @@ DIRS= $(ROOTDATADIR) CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + FILEMODE= 755 $(ROOTDATADIR)/$(DATA):= FILEMODE=444 diff --git a/usr/src/cmd/lp/Makefile.lp b/usr/src/cmd/lp/Makefile.lp index 90814cf119..c4c4ff2a92 100644 --- a/usr/src/cmd/lp/Makefile.lp +++ b/usr/src/cmd/lp/Makefile.lp @@ -23,6 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # # cmd/lp/Makefile.lp @@ -97,6 +98,9 @@ CERRWARN += -_gcc=-Wno-empty-body CERRWARN += -_gcc=-Wno-extra CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + all:= TARGET= all install:= TARGET= install clean:= TARGET= clean diff --git a/usr/src/cmd/lp/lib/filters/Makefile b/usr/src/cmd/lp/lib/filters/Makefile index 4b91ddcc4b..09c55243b6 100644 --- a/usr/src/cmd/lp/lib/filters/Makefile +++ b/usr/src/cmd/lp/lib/filters/Makefile @@ -23,6 +23,7 @@ # Copyright 1990-2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. LIBRARY = liblpflt.a @@ -52,6 +53,9 @@ CPPFLAGS = -I../../include $(CPPFLAGS.master) CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + POFILE = lp_lib_filters.po .KEEP_STATE: diff --git a/usr/src/cmd/lp/lib/oam/Makefile b/usr/src/cmd/lp/lib/oam/Makefile index 531a504f7f..871fdb45f2 100644 --- a/usr/src/cmd/lp/lib/oam/Makefile +++ b/usr/src/cmd/lp/lib/oam/Makefile @@ -23,10 +23,8 @@ # Copyright 1990-2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/lp/lib/oam/Makefile -# +# Copyright (c) 2018, Joyent, Inc. + include ../../Makefile.lp LIBRARY = liblpoam.a @@ -71,6 +69,9 @@ LIBS = $(LIBRARY) CPPFLAGS = -I$(LPINC) $(CPPFLAGS.master) +# not linted +SMATCH=off + .KEEP_STATE: all install : $(TXTFILES) $(LIBS) diff --git a/usr/src/cmd/luxadm/Makefile b/usr/src/cmd/luxadm/Makefile index 75bb1db5f7..7b8abc40d3 100644 --- a/usr/src/cmd/luxadm/Makefile +++ b/usr/src/cmd/luxadm/Makefile @@ -22,11 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = luxadm COBJS = adm.o fchba.o lux_util.o fabric_conf.o -OBJS_sparc= g_adm.o diag.o fcalupdate.o hotplug.o qlgcupdate.o setboot.o +OBJS_sparc= g_adm.o diag.o fcalupdate.o hotplug.o qlgcupdate.o setboot.o OBJS_i386 = x86_adm.o errormsgs.o OBJS = $(OBJS_$(MACH)) $(COBJS) @@ -42,6 +43,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + sparc_LDLIBS = -la5k -lg_fc -ldevid -lkstat -ldevinfo i386_LDLIBS = LDLIBS += $($(MACH)_LDLIBS) diff --git a/usr/src/cmd/mail/Makefile b/usr/src/cmd/mail/Makefile index 0bd18f5023..8f24d04f95 100644 --- a/usr/src/cmd/mail/Makefile +++ b/usr/src/cmd/mail/Makefile @@ -22,9 +22,10 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. +# - -BINPROG= mail +BINPROG= mail PROG= $(BINPROG) @@ -76,6 +77,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-extra +# missing type declarations for old-style functions +SMATCH = off + LDLIBS += -lmail -lsocket # mail defines its own delete() - reduce symbols to locals to remove name clash. @@ -104,7 +108,7 @@ $(ROOTINC)/% : % .PARALLEL: $(MAILOBJS) $(OBJS) -all: $(PROG) +all: $(PROG) mail: $(MAILOBJS) $(LINK.c) -o $@ $(MAILOBJS) $(LDLIBS) @@ -117,7 +121,7 @@ install: all .WAIT $(ROOTBINPROG) $(ROOTSYMLINKS) $(ROOTBIN)/rmail: $(RM) $@; $(SYMLINK) mail $@ -lint: +lint: $(LINT.c) $(MAILSRC) clean: diff --git a/usr/src/cmd/mailwrapper/Makefile b/usr/src/cmd/mailwrapper/Makefile index 0e66a47b93..45d8d780b1 100644 --- a/usr/src/cmd/mailwrapper/Makefile +++ b/usr/src/cmd/mailwrapper/Makefile @@ -12,10 +12,11 @@ # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Copyright 2014 Alexander Pyhalov +# Copyright (c) 2018, Joyent, Inc. # -LIBPROG= mailwrapper +LIBPROG= mailwrapper PROG= $(LIBPROG) @@ -49,6 +50,8 @@ CPPFLAGS = -I. $(CPPFLAGS.master) LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 +SMOFF += all_func_returns + # conditional assignments # all:= TARGET= all @@ -65,7 +68,7 @@ $(ROOTINC)/% : % .PARALLEL: $(MWOBJS) $(OBJS) -all: $(PROG) +all: $(PROG) mailwrapper: $(MWOBJS) $(LINK.c) -o $@ $(MWOBJS) $(LDLIBS) @@ -75,7 +78,7 @@ install: all .WAIT $(ROOTLIBPROG) $(ROOTSYMLINKS) $(ROOTETCFILES) # ROOTSYMLINKS # -$(ROOTBIN)/mailq: +$(ROOTBIN)/mailq: $(RM) $@; $(SYMLINK) ../lib/mailwrapper $@ $(ROOTLIB)/sendmail: @@ -90,7 +93,7 @@ $(ROOTUSRSBIN)/sendmail: $(ROOTETCMAIL)/%: % $(INS.file) -lint: +lint: $(LINT.c) $(SRCS) clean: diff --git a/usr/src/cmd/mailx/Makefile b/usr/src/cmd/mailx/Makefile index 6afe955bf2..939ed76141 100644 --- a/usr/src/cmd/mailx/Makefile +++ b/usr/src/cmd/mailx/Makefile @@ -68,6 +68,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-clobbered +# not linted +SMATCH=off + LINTFLAGS= -hb LDLIBS += -lmail -lcustr LDFLAGS += $(MAPFILE.NGB:%=-M%) diff --git a/usr/src/cmd/mandoc/Makefile.common b/usr/src/cmd/mandoc/Makefile.common index 0c00bf6fd5..f8834bb4a8 100644 --- a/usr/src/cmd/mandoc/Makefile.common +++ b/usr/src/cmd/mandoc/Makefile.common @@ -79,6 +79,9 @@ OBJS += compat_ohash.o # XXX gcc 4.4.4 false positive roff.o := CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + CFLAGS += $(CC_VERBOSE) CSTD= $(CSTD_GNU99) diff --git a/usr/src/cmd/mdb/Makefile.mdb b/usr/src/cmd/mdb/Makefile.mdb index 529f3a9a12..c235559ee5 100644 --- a/usr/src/cmd/mdb/Makefile.mdb +++ b/usr/src/cmd/mdb/Makefile.mdb @@ -109,6 +109,8 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable +SMOFF += all_func_returns + # # -erroff=E_INCONS_ARG_DECL2 works around a problem where lint gets confused # about how struct mdb_tgt_gregset is used in mdb_tgt_stack_f() and diff --git a/usr/src/cmd/mdb/Makefile.module b/usr/src/cmd/mdb/Makefile.module index 2c8da775da..3b4c8db69f 100644 --- a/usr/src/cmd/mdb/Makefile.module +++ b/usr/src/cmd/mdb/Makefile.module @@ -23,7 +23,7 @@ # Use is subject to license terms. # # Copyright (c) 2013 by Delphix. All rights reserved. -# Copyright 2015, Joyent, Inc. +# Copyright (c) 2018, Joyent, Inc. # .KEEP_STATE: @@ -123,6 +123,8 @@ LDFLAGS64 += $(ZTEXT) ASFLAGS += -P AS_CPPFLAGS += -D_ASM +SMOFF += all_func_returns,index_overflow + # Module type-specific compiler flags $(MODOBJS) := CFLAGS += $(C_BIGPICFLAGS) $(XREGSFLAG) $(MODOBJS) := CFLAGS64 += $(C_BIGPICFLAGS) $(XREGSFLAG) diff --git a/usr/src/cmd/mdb/intel/amd64/ip/Makefile b/usr/src/cmd/mdb/intel/amd64/ip/Makefile index 5112aeaac0..f7ebb0c677 100644 --- a/usr/src/cmd/mdb/intel/amd64/ip/Makefile +++ b/usr/src/cmd/mdb/intel/amd64/ip/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. MODULE = ip.so MDBTGT = kvm @@ -34,3 +35,6 @@ include ../../Makefile.amd64 include ../../../Makefile.module CPPFLAGS += -I$(SRC)/uts/common/inet + +# needs work +SMOFF += shift_to_zero diff --git a/usr/src/cmd/mdb/intel/ia32/libpython/Makefile b/usr/src/cmd/mdb/intel/ia32/libpython/Makefile index 4ad419c859..9e19bf2e41 100644 --- a/usr/src/cmd/mdb/intel/ia32/libpython/Makefile +++ b/usr/src/cmd/mdb/intel/ia32/libpython/Makefile @@ -22,6 +22,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/Makefile.master @@ -39,8 +40,17 @@ include ../../../Makefile.module %.o := CPPFLAGS += $(PYCPPFLAGS) %.ln := CPPFLAGS += $(PYLNFLAGS) + +# +# Why these? Well, the pyconfig.h header hard-codes _FILE_OFFSET_BITS +# to 64, regardless of what we have set here. GCC quietens this complaint via +# use of -isystem, but neither lint nor smatch can do that. +# LINTFLAGS += -erroff=E_MACRO_REDEFINED +# not linted +SMATCH=off + dmod/$(MODULE) := LDLIBS += -lproc %.o: $(MODSRCS_DIR)/%.c diff --git a/usr/src/cmd/mkmsgs/Makefile b/usr/src/cmd/mkmsgs/Makefile index d2ebe036bf..3bf86c9da2 100644 --- a/usr/src/cmd/mkmsgs/Makefile +++ b/usr/src/cmd/mkmsgs/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= mkmsgs @@ -30,9 +31,12 @@ LDLIBS += -lgen CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/modload/Makefile.com b/usr/src/cmd/modload/Makefile.com index 3033e5942a..cf82649c7d 100644 --- a/usr/src/cmd/modload/Makefile.com +++ b/usr/src/cmd/modload/Makefile.com @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/modload/Makefile.com +# Copyright (c) 2018, Joyent, Inc. # # makefile for loadable module utilities @@ -61,6 +61,9 @@ LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + # install specifics $(ROOTDRVPROG) := FILEMODE = 0555 diff --git a/usr/src/cmd/more/Makefile b/usr/src/cmd/more/Makefile index 9ad39bb247..cfa30880a2 100644 --- a/usr/src/cmd/more/Makefile +++ b/usr/src/cmd/more/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= more DATA= more.help @@ -41,9 +42,12 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-clobbered +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) $(DATA) +all: $(PROG) $(DATA) install: all $(ROOTPROG) $(ROOTLIBDATA) $(RM) $(ROOTBIN)/page diff --git a/usr/src/cmd/mpathadm/Makefile b/usr/src/cmd/mpathadm/Makefile index 1fff65a611..1c22115e65 100644 --- a/usr/src/cmd/mpathadm/Makefile +++ b/usr/src/cmd/mpathadm/Makefile @@ -22,7 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/mpathadm/Makefile +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.cmd @@ -37,9 +37,12 @@ LDLIBS += -lMPAPI -ldevid LINTFLAGS += -xerroff=E_BAD_FORMAT_STR2 +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) $(PROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) diff --git a/usr/src/cmd/ndmpd/Makefile b/usr/src/cmd/ndmpd/Makefile index 4d5ed69075..d1dd86cf8d 100644 --- a/usr/src/cmd/ndmpd/Makefile +++ b/usr/src/cmd/ndmpd/Makefile @@ -1,5 +1,6 @@ # # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # # @@ -51,6 +52,9 @@ CPPFLAGS += $(LFLAGS64) CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DDEBUG CPPFLAGS += -I. -Iinclude +# not linted +SMATCH=off + CSTD = $(CSTD_GNU99) # lint does not like unused _umem_*_init diff --git a/usr/src/cmd/ndmpstat/Makefile b/usr/src/cmd/ndmpstat/Makefile index 94458f9f9b..f9bf0d8427 100644 --- a/usr/src/cmd/ndmpstat/Makefile +++ b/usr/src/cmd/ndmpstat/Makefile @@ -2,6 +2,8 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. +# # # BSD 3 Clause License @@ -47,6 +49,8 @@ POFILE= ndmpstat.po LDLIBS += -lndmp +SMOFF += signed + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/news/Makefile b/usr/src/cmd/news/Makefile index 214ae487bd..0d7fcbd64f 100644 --- a/usr/src/cmd/news/Makefile +++ b/usr/src/cmd/news/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= news @@ -32,6 +33,9 @@ DIRS= $(VARNEWSD) CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/nl/Makefile b/usr/src/cmd/nl/Makefile index 1d68f2308f..20caaeb35f 100644 --- a/usr/src/cmd/nl/Makefile +++ b/usr/src/cmd/nl/Makefile @@ -22,6 +22,8 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. +# # Message catalog requires no special processing because messages # only occur in ./nl.c, not in ../expr/compile.c. @@ -40,6 +42,10 @@ LDLIBS += -lgen CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable + +# not linted +SMATCH=off + $(XPG4):= CPPFLAGS += -DXPG4 MAPFILE.INT = ../expr/mapfile-intf diff --git a/usr/src/cmd/nlsadmin/Makefile b/usr/src/cmd/nlsadmin/Makefile index ce2bc57745..9f88bb3986 100644 --- a/usr/src/cmd/nlsadmin/Makefile +++ b/usr/src/cmd/nlsadmin/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= nlsadmin @@ -31,6 +32,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/nscd/Makefile b/usr/src/cmd/nscd/Makefile index 3ee87ff450..12454b8db3 100644 --- a/usr/src/cmd/nscd/Makefile +++ b/usr/src/cmd/nscd/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # # Makefile for name service cache daemon # @@ -63,6 +64,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-type-limits +# not linted +SMATCH=off + # nscd interposes on many symbols, and must export others for its own dlsym() # use, and dlsym() calls from libc. Itemizing the interfaces within a mapfile # is error-prone, so establish the whole object as an interposer. diff --git a/usr/src/cmd/nvmeadm/Makefile b/usr/src/cmd/nvmeadm/Makefile index a0cc24ead0..3935f784a8 100644 --- a/usr/src/cmd/nvmeadm/Makefile +++ b/usr/src/cmd/nvmeadm/Makefile @@ -29,6 +29,9 @@ CFLAGS += $(CCVERBOSE) LDLIBS += -ldevinfo CSTD= $(CSTD_GNU99) +# error: cannot size expression +SMATCH=off + all: $(PROG) $(PROG): $(OBJS) diff --git a/usr/src/cmd/oamuser/group/Makefile b/usr/src/cmd/oamuser/group/Makefile index 8289dbda77..7c87c203df 100644 --- a/usr/src/cmd/oamuser/group/Makefile +++ b/usr/src/cmd/oamuser/group/Makefile @@ -23,8 +23,7 @@ # # Copyright (c) 2013 RackTop Systems. # -# cmd/oamuser/group/Makefile -# +# Copyright (c) 2018, Joyent, Inc. include ../../Makefile.cmd @@ -54,6 +53,9 @@ INSSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%) CPPFLAGS= -I$(HERE) -I$(LOCAL) $(CPPFLAGS.master) FILEMODE= 0555 +# not linted +SMATCH=off + $(GROUPADD) := OBJS = $(ADD_OBJ) $(GROUPADD) := LDLIBS += $(LIBUSRGRP) -lcmdutils diff --git a/usr/src/cmd/oamuser/lib/Makefile b/usr/src/cmd/oamuser/lib/Makefile index 36f85ac89f..b5e506554d 100644 --- a/usr/src/cmd/oamuser/lib/Makefile +++ b/usr/src/cmd/oamuser/lib/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. LIBRARY= lib.a @@ -66,6 +67,9 @@ CPPFLAGS= -I. -I$(GENERAL) $(CPPFLAGS.master) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + ARFLAGS= cr AROBJS= `$(LORDER) $(OBJS) | $(TSORT)` LINTFLAGS= -u diff --git a/usr/src/cmd/oamuser/user/Makefile b/usr/src/cmd/oamuser/user/Makefile index a8feed2b6d..aa4f3e1365 100644 --- a/usr/src/cmd/oamuser/user/Makefile +++ b/usr/src/cmd/oamuser/user/Makefile @@ -23,8 +23,7 @@ # Copyright (c) 2013 RackTop Systems. # Copyright (c) 2013 Gary Mills # -# cmd/oamuser/user/Makefile -# +# Copyright (c) 2018, Joyent, Inc. DEFAULTFILES= useradd.dfl @@ -76,6 +75,9 @@ INSSKELFILE= $(SKELFILE:%=$(ROOTSKEL)/%) CPPFLAGS= -I$(HERE) -I$(LOCAL) $(CPPFLAGS.master) CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + $(INSSBINPROG) := FILEMODE = 0555 $(INSSYSADMPROG):= FILEMODE = 0500 $(INSSKELFILE) := FILEMODE = 0644 diff --git a/usr/src/cmd/oawk/Makefile b/usr/src/cmd/oawk/Makefile index 1b148cf0de..0ca6be8064 100644 --- a/usr/src/cmd/oawk/Makefile +++ b/usr/src/cmd/oawk/Makefile @@ -23,6 +23,7 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.cmd @@ -69,6 +70,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-extra CERRWARN += -_gcc=-Wno-parentheses +# missing type declarations +SMATCH = off + .KEEP_STATE : all : $(PROG) $(TXTS) diff --git a/usr/src/cmd/passmgmt/Makefile b/usr/src/cmd/passmgmt/Makefile index f6d9bf3283..2ce3ab254f 100644 --- a/usr/src/cmd/passmgmt/Makefile +++ b/usr/src/cmd/passmgmt/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG= passmgmt @@ -42,6 +43,9 @@ CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + all: $(PROG) $(TXTS) XGETFLAGS= -a -x $(PROG).xcl diff --git a/usr/src/cmd/perl/Makefile.targ b/usr/src/cmd/perl/Makefile.targ index b3f5ec9bd3..ec6110c5cb 100644 --- a/usr/src/cmd/perl/Makefile.targ +++ b/usr/src/cmd/perl/Makefile.targ @@ -11,7 +11,7 @@ # # Copyright (c) 2014 Racktop Systems. # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. -# +# Copyright (c) 2018, Joyent, Inc. # Link against libc as perl solaris specs $(PERLEXT):= LDLIBS += -lc @@ -26,6 +26,8 @@ $(ROOTPERLMOD) := FILEMODE = 0444 PCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ -DPERL_USE_SAFE_PUTENV -D_TS_ERRNO +SMATCH=off + $(MACH): $(INS.dir) diff --git a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com index a797ca6ea4..b590aa9806 100644 --- a/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com +++ b/usr/src/cmd/picl/plugins/lib/picld_pluginutil/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. LIBRARY= libpicld_pluginutil.a VERS= .1 @@ -53,6 +54,9 @@ POFILE= picld_pluginutil.po CPPFLAGS += -I.. -I$(SRC)/lib/libpicl -I$(SRC)/lib/libpicltree CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized + +SMOFF += all_func_returns + CPPFLAGS += -D_REENTRANT DYNFLAGS += $(ZNOLAZYLOAD) LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) diff --git a/usr/src/cmd/pools/poolcfg/Makefile b/usr/src/cmd/pools/poolcfg/Makefile index 670674e968..5b117fcf04 100644 --- a/usr/src/cmd/pools/poolcfg/Makefile +++ b/usr/src/cmd/pools/poolcfg/Makefile @@ -22,9 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# -# cmd/pools/poolbind/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG = poolcfg OBJS = poolcfg_lex.o poolcfg_grammar.o @@ -49,6 +47,9 @@ LDLIBS += -lpool -ll XGETFLAGS = -a CLOBBERFILES += poolcfg_lex.c poolcfg_grammar.c poolcfg_grammar.h +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/pools/poold/Makefile b/usr/src/cmd/pools/poold/Makefile index cc1e3791f1..757f882219 100644 --- a/usr/src/cmd/pools/poold/Makefile +++ b/usr/src/cmd/pools/poold/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/pools/poold/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG = poold OBJS = poold.o @@ -87,6 +87,9 @@ LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 $(BLD_JAVA_8)LINTFLAGS64 += -erroff=E_NAME_USED_NOT_DEF2 LINTLIBS += -L$(LIBPOOL_PATH) -lpool +# not linted +SMATCH=off + CPPFLAGS += $(INCS) ROOTCMDDIR = $(ROOT)/usr/lib/pool diff --git a/usr/src/cmd/pools/poold/libjkstat/Makefile.com b/usr/src/cmd/pools/poold/libjkstat/Makefile.com index 21f1762460..54cba6a88e 100644 --- a/usr/src/cmd/pools/poold/libjkstat/Makefile.com +++ b/usr/src/cmd/pools/poold/libjkstat/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# +# Copyright (c) 2018, Joyent, Inc. LIBRARY = libjkstat.a VERS = .1 @@ -42,6 +41,9 @@ ROOTLIBDIR = $(ROOT)/usr/lib/pool CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 $(INCS) +# not linted +SMATCH=off + all: $(LIBS) lint: lintcheck diff --git a/usr/src/cmd/pools/poold/libjlgrp/Makefile.com b/usr/src/cmd/pools/poold/libjlgrp/Makefile.com index f878b1e6f2..9011c5a3e0 100644 --- a/usr/src/cmd/pools/poold/libjlgrp/Makefile.com +++ b/usr/src/cmd/pools/poold/libjlgrp/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# +# Copyright (c) 2018, Joyent, Inc. LIBRARY = libjlgrp.a VERS = .1 @@ -42,6 +41,9 @@ ROOTLIBDIR = $(ROOT)/usr/lib/pool CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 $(INCS) +# not linted +SMATCH=off + all: $(LIBS) lint: lintcheck diff --git a/usr/src/cmd/pools/poold/libjpool/Makefile.com b/usr/src/cmd/pools/poold/libjpool/Makefile.com index 58567468ab..68d513026e 100644 --- a/usr/src/cmd/pools/poold/libjpool/Makefile.com +++ b/usr/src/cmd/pools/poold/libjpool/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# +# Copyright (c) 2018, Joyent, Inc. LIBRARY = libjpool.a VERS = .1 @@ -42,6 +41,9 @@ ROOTLIBDIR = $(ROOT)/usr/lib/pool CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 $(INCS) +# not linted +SMATCH=off + all: $(LIBS) lint: lintcheck diff --git a/usr/src/cmd/pools/poold/libjsyslog/Makefile.com b/usr/src/cmd/pools/poold/libjsyslog/Makefile.com index 9b0fc312a8..8f57d254e2 100644 --- a/usr/src/cmd/pools/poold/libjsyslog/Makefile.com +++ b/usr/src/cmd/pools/poold/libjsyslog/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# +# Copyright (c) 2018, Joyent, Inc. LIBRARY = libjsyslog.a VERS = .1 @@ -42,6 +41,9 @@ ROOTLIBDIR = $(ROOT)/usr/lib/pool CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 $(INCS) +# not linted +SMATCH=off + all: $(LIBS) lint: lintcheck diff --git a/usr/src/cmd/power/Makefile b/usr/src/cmd/power/Makefile index 3934605588..77c3699bb9 100644 --- a/usr/src/cmd/power/Makefile +++ b/usr/src/cmd/power/Makefile @@ -22,8 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/power/Makefile -# +# Copyright (c) 2018, Joyent, Inc. DAEMON_SRCS = powerd.c sysstat.c DAEMON_OBJS = $(DAEMON_SRCS:%.c=%.o) @@ -75,14 +74,16 @@ ROOTLIBPOWERDAEMON= $(DAEMON:%=$(ROOTLIBPOWER)/%) $(ROOTLIBPOWER) := FILEMODE= 755 $(ROOTLIBPOWERDAEMON) := FILEMODE= 555 -ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%) -$(ROOTETCFILES) := FILEMODE= 644 +ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%) +$(ROOTETCFILES) := FILEMODE= 644 # # lint pass one enforcement # CFLAGS += $(CCVERBOSE) +SMOFF += signed + .PARALLEL: $(OBJS) .KEEP_STATE: diff --git a/usr/src/cmd/powertop/Makefile.com b/usr/src/cmd/powertop/Makefile.com index 441cefcbbc..37a1434c04 100644 --- a/usr/src/cmd/powertop/Makefile.com +++ b/usr/src/cmd/powertop/Makefile.com @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = powertop @@ -43,6 +44,9 @@ CFLAGS += $(CCVERBOSE) CFLAGS64 += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized + +SMOFF += free + LDLIBS += -lcurses -ldtrace -lkstat FILEMODE = 0555 diff --git a/usr/src/cmd/pr/Makefile b/usr/src/cmd/pr/Makefile index 802d3170c6..6480487087 100644 --- a/usr/src/cmd/pr/Makefile +++ b/usr/src/cmd/pr/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG= pr XPG4PROG= pr @@ -33,6 +34,8 @@ DCFILE = $(PROG).dc CERRWARN += -_gcc=-Wno-parentheses +SMOFF += indenting + $(XPG4):= CPPFLAGS += -DXPG4 $(POFILE) := XGETFLAGS += -a -x pr.xcl diff --git a/usr/src/cmd/praudit/Makefile b/usr/src/cmd/praudit/Makefile index 4a1b957841..b364320c8e 100644 --- a/usr/src/cmd/praudit/Makefile +++ b/usr/src/cmd/praudit/Makefile @@ -24,7 +24,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. XLATEDIR = $(SRC)/lib/libbsm/common @@ -45,6 +45,8 @@ CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += signed + LDLIBS += -lbsm -lnsl -lpam -ltsol .KEEP_STATE: diff --git a/usr/src/cmd/prctl/Makefile.com b/usr/src/cmd/prctl/Makefile.com index 7c57f8f7ac..6327f99b25 100644 --- a/usr/src/cmd/prctl/Makefile.com +++ b/usr/src/cmd/prctl/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= prctl @@ -36,6 +37,9 @@ CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lproc -lproject # Adding this flag to LINTFLAGS did not do anything. I'm adding this flag diff --git a/usr/src/cmd/print/bsd-sysv-commands/Makefile b/usr/src/cmd/print/bsd-sysv-commands/Makefile index ee6131c805..cb71a89a43 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/Makefile +++ b/usr/src/cmd/print/bsd-sysv-commands/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.sp @@ -67,6 +67,9 @@ in.lpd:= LDLIBS += -lnsl -lsocket CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + all: $(BINPROGS) $(SBINPROGS) # each program needs common.o as well diff --git a/usr/src/cmd/print/conv_fix/Makefile b/usr/src/cmd/print/conv_fix/Makefile index cac80619e0..73b53b46af 100644 --- a/usr/src/cmd/print/conv_fix/Makefile +++ b/usr/src/cmd/print/conv_fix/Makefile @@ -22,8 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/lp/client/conv_fix/Makefile -# +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.sp @@ -41,11 +40,14 @@ CPPFLAGS += -I$(NPRTINC) CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) -install: all $(ROOTLIBPRINTPROG) +install: all $(ROOTLIBPRINTPROG) $(ROOTLIBPRINT)/%: % $(INS.file) diff --git a/usr/src/cmd/print/lpset/Makefile b/usr/src/cmd/print/lpset/Makefile index 7b81c117b2..1929022f9f 100644 --- a/usr/src/cmd/print/lpset/Makefile +++ b/usr/src/cmd/print/lpset/Makefile @@ -22,8 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/lp/client/lpset/Makefile -# +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.sp @@ -39,13 +38,17 @@ FILEMODE= 04511 CPPFLAGS += -I$(NPRTINC) CERRWARN += -_gcc=-Wno-implicit-function-declaration + +# not linted +SMATCH=off + LDLIBS += $(LIBNPRT) -lsecdb .KEEP_STATE: all: $(PROG) -install: all $(ROOTBIN) $(ROOTBINPROG) +install: all $(ROOTBIN) $(ROOTBINPROG) $(ROOTBIN): $(INS.dir) diff --git a/usr/src/cmd/print/printer-info/Makefile b/usr/src/cmd/print/printer-info/Makefile index 1aed6ba8f5..cbeb335826 100644 --- a/usr/src/cmd/print/printer-info/Makefile +++ b/usr/src/cmd/print/printer-info/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.sp @@ -34,8 +35,6 @@ OBJECTS = $(PROG).o ROOTPROG= $(PROG:%=$(ROOTLIBLPBIN)/%) $(ROOTPROG) := FILEMODE=555 -CERRWARN += -_gcc=-Wno-implicit-function-declaration - .KEEP_STATE: all: $(PROG) @@ -46,13 +45,13 @@ $(ROOTLIBLPBIN): $(ROOTLIBLPBIN)/%: % $(INS.file) -install: all $(ROOTLIBLPBIN) $(ROOTPROG) +install: all $(ROOTLIBLPBIN) $(ROOTPROG) $(PROGRAM): $(OBJECTS) $(CC) $(CFLAGS) -o $@ $(OBJECTS) clean: - $(RM) $(PROG) *.o + $(RM) $(PROG) *.o cstyle: cstyle $(SRCS) diff --git a/usr/src/cmd/print/printer-info/printer-info.c b/usr/src/cmd/print/printer-info/printer-info.c index a469c5194d..dddf0d3a68 100644 --- a/usr/src/cmd/print/printer-info/printer-info.c +++ b/usr/src/cmd/print/printer-info/printer-info.c @@ -24,9 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2018, Joyent, Inc. + */ #include <stdio.h> +#include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/ioctl.h> diff --git a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile index 690b18ccfa..187517ea11 100644 --- a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile +++ b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # # Makefile for Java Print Manager server @@ -86,6 +87,9 @@ CPPFLAGS += -I$(JAVA_ROOT)/include -I$(JAVA_ROOT)/include/solaris -I. CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lprint -lnsl -lsocket -lc CLEANFILES= *.class $(LINTLIB) $(LINTOUT) diff --git a/usr/src/cmd/prtvtoc/Makefile b/usr/src/cmd/prtvtoc/Makefile index 59db9914bd..c4ae5fe936 100644 --- a/usr/src/cmd/prtvtoc/Makefile +++ b/usr/src/cmd/prtvtoc/Makefile @@ -21,10 +21,9 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/prtvtoc/Makefile -# +# Copyright (c) 2018, Joyent, Inc. -PROG= prtvtoc +PROG= prtvtoc include ../Makefile.cmd @@ -35,9 +34,12 @@ LDLIBS += -ladm -lefi CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) $(ROOTSYMLINK) diff --git a/usr/src/cmd/ps/Makefile.com b/usr/src/cmd/ps/Makefile.com index aa7a2bec45..d9209ba95a 100644 --- a/usr/src/cmd/ps/Makefile.com +++ b/usr/src/cmd/ps/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/ps/Makefile.com -# +# Copyright (c) 2018, Joyent, Inc. PROG= ps @@ -36,6 +35,9 @@ include ../../Makefile.cmd CFLAGS += $(CCVERBOSE) LDLIBS += -lproject +# not linted +SMATCH=off + .KEEP_STATE: %.o: ../%.c diff --git a/usr/src/cmd/ptools/Makefile.bld b/usr/src/cmd/ptools/Makefile.bld index c34bf5dc8d..56fb9ca118 100644 --- a/usr/src/cmd/ptools/Makefile.bld +++ b/usr/src/cmd/ptools/Makefile.bld @@ -23,6 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG:sh = basename `cd ..; pwd` @@ -56,11 +57,15 @@ LDLIBS_pwdx = -lproc LDLIBS += $(LDLIBS_$(PROG)) CERRWARN_plgrp += -_gcc=-Wno-parentheses +CERRWARN_plgrp += -_smatch=off + +CERRWARN_pmadvise += -_smatch=off CERRWARN_ppriv += -_gcc=-Wno-parentheses CERRWARN_ppriv += -_gcc=-Wno-uninitialized CERRWARN_ptree += -_gcc=-Wno-parentheses +CERRWARN_ptree += -_smatch=off CERRWARN_pstack += -_gcc=-Wno-uninitialized CERRWARN_pstack += -_gcc=-Wno-clobbered @@ -68,6 +73,8 @@ CERRWARN_pstack += -_gcc=-Wno-clobbered CERRWARN_pargs += -_gcc=-Wno-clobbered CERRWARN_pargs += -_gcc=-Wno-type-limits +CERRWARN_pwait += -_smatch=off + CERRWARN += $(CERRWARN_$(PROG)) # pargs depends on ../../common/elfcap components diff --git a/usr/src/cmd/pwconv/Makefile b/usr/src/cmd/pwconv/Makefile index 90b1dfebea..9ef694bf6e 100644 --- a/usr/src/cmd/pwconv/Makefile +++ b/usr/src/cmd/pwconv/Makefile @@ -21,8 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/pwconv/Makefile -# +# Copyright (c) 2018, Joyent, Inc. PROG= pwconv @@ -32,9 +31,11 @@ TEXT_DOMAIN= SUNW_OST_ADMIN FILEMODE= 0555 RELSBIN= ../sbin +SMOFF += indenting + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) $(ROOTPROG) @@ -44,5 +45,5 @@ $(ROOTPROG): clean: lint: lint_PROG - + include ../Makefile.targ diff --git a/usr/src/cmd/rcap/Makefile.com b/usr/src/cmd/rcap/Makefile.com index fa5925f732..1289c6d4d8 100644 --- a/usr/src/cmd/rcap/Makefile.com +++ b/usr/src/cmd/rcap/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # # Definitions for targets shared by some subdirs, which have @@ -35,6 +36,8 @@ CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses +SMOFF += strcpy_overflow + %.o: $(COMMON_DIR)/%.c $(COMPILE.c) $< %.po: $(COMMON_DIR)/%.c diff --git a/usr/src/cmd/rcm_daemon/Makefile.com b/usr/src/cmd/rcm_daemon/Makefile.com index b060ee92a1..621e1cbfb9 100644 --- a/usr/src/cmd/rcm_daemon/Makefile.com +++ b/usr/src/cmd/rcm_daemon/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2016 Nexenta Systems, Inc. +# Copyright (c) 2018, Joyent, Inc. # include ../../Makefile.cmd @@ -124,6 +125,9 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + MAPFILES = ../common/mapfile-intf $(MAPFILE.NGB) rcm_daemon := LDFLAGS += $(MAPFILES:%=-M%) diff --git a/usr/src/cmd/refer/Makefile b/usr/src/cmd/refer/Makefile index 3c2ed48157..a07a51f0ac 100644 --- a/usr/src/cmd/refer/Makefile +++ b/usr/src/cmd/refer/Makefile @@ -23,6 +23,7 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.cmd @@ -50,6 +51,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + CLOBBERFILES += $(PROG3) addbib.po := XGETFLAGS += -a -x addbib.xcl diff --git a/usr/src/cmd/regcmp/Makefile b/usr/src/cmd/regcmp/Makefile index 969a8b6d4b..d77005366f 100644 --- a/usr/src/cmd/regcmp/Makefile +++ b/usr/src/cmd/regcmp/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= regcmp @@ -29,6 +30,8 @@ include ../Makefile.cmd CERRWARN += -_gcc=-Wno-parentheses +SMOFF += all_func_returns + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/rmformat/Makefile b/usr/src/cmd/rmformat/Makefile index 91634d31fa..6761060197 100644 --- a/usr/src/cmd/rmformat/Makefile +++ b/usr/src/cmd/rmformat/Makefile @@ -23,6 +23,7 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= rmformat @@ -36,6 +37,9 @@ LDLIBS += -lsmedia -lvolmgt -ladm -lefi CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LINTFLAGS += -u CPPFLAGS += -D_FILE_OFFSET_BITS=64 @@ -49,7 +53,7 @@ $(PROG): $(OBJS) $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTPROG) +install: all $(ROOTPROG) clean: $(RM) $(OBJS) diff --git a/usr/src/cmd/rmmount/Makefile b/usr/src/cmd/rmmount/Makefile index 4a075da5ef..2c6d2646af 100644 --- a/usr/src/cmd/rmmount/Makefile +++ b/usr/src/cmd/rmmount/Makefile @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = rmmount LOCAL_OBJS = rmmount.o @@ -47,6 +48,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/rmvolmgr/Makefile b/usr/src/cmd/rmvolmgr/Makefile index 979a41cc5c..589acaab2d 100644 --- a/usr/src/cmd/rmvolmgr/Makefile +++ b/usr/src/cmd/rmvolmgr/Makefile @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = rmvolmgr OBJS = rmm_common.o rmvolmgr.o vold.o @@ -48,6 +49,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + ROOTCMDDIR = $(ROOTLIB) ROOTMANIFESTDIR = $(ROOTSVCSYSTEMFILESYSTEM) $(ROOTMANIFEST) := FILEMODE = 444 diff --git a/usr/src/cmd/rpcbind/Makefile b/usr/src/cmd/rpcbind/Makefile index 96d640bc1c..ae6205f5bf 100644 --- a/usr/src/cmd/rpcbind/Makefile +++ b/usr/src/cmd/rpcbind/Makefile @@ -24,6 +24,7 @@ # # Copyright 2014 Nexenta Systems, Inc. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG= rpcbind MANIFEST= bind.xml @@ -46,6 +47,9 @@ CPPFLAGS += -D_REENTRANT $(RELEASE_BUILD)CPPFLAGS += -DNDEBUG LDLIBS += -lsocket -lnsl -lwrap -lscf -lumem +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) $(SVCMETHOD) diff --git a/usr/src/cmd/rpcsvc/Makefile b/usr/src/cmd/rpcsvc/Makefile index fb78120a07..3f306e0142 100644 --- a/usr/src/cmd/rpcsvc/Makefile +++ b/usr/src/cmd/rpcsvc/Makefile @@ -22,8 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# -# cmd/rpcsvc/Makefile +# Copyright (c) 2018, Joyent, Inc. PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc @@ -64,6 +63,10 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-extra CERRWARN += -_gcc=-Wno-unused-function + +# not linted +SMATCH=off + LDLIBS += -lnsl rusers := CFLAGS += $(CCVERBOSE) $(BINPROG) := LDLIBS += -lrpcsvc diff --git a/usr/src/cmd/sa/Makefile b/usr/src/cmd/sa/Makefile index 8e8e9bd0ce..8456d9fead 100644 --- a/usr/src/cmd/sa/Makefile +++ b/usr/src/cmd/sa/Makefile @@ -23,8 +23,7 @@ # Use is subject to license terms. # Copyright (c) 2013 Andrew Stormont. All rights reserved. # -# cmd/sa/Makefile -# +# Copyright (c) 2018, Joyent, Inc. MANIFEST = sar.xml SVCMETHOD = svc-sar @@ -36,6 +35,8 @@ ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += all_func_returns + GREP= grep SADC= sadc diff --git a/usr/src/cmd/saf/Makefile b/usr/src/cmd/saf/Makefile index 438a9d17b4..d557d52c30 100644 --- a/usr/src/cmd/saf/Makefile +++ b/usr/src/cmd/saf/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= sac sacadm pmadm @@ -61,6 +62,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-extra +# too many untyped funcs +SMATCH=off + util1.o := CPPFLAGS += -DSAC util2.o := CPPFLAGS += -USAC diff --git a/usr/src/cmd/sasinfo/Makefile b/usr/src/cmd/sasinfo/Makefile index 919b3bcc78..f7c34767d9 100644 --- a/usr/src/cmd/sasinfo/Makefile +++ b/usr/src/cmd/sasinfo/Makefile @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.cmd @@ -47,6 +47,8 @@ LDLIBS += -lSMHBAAPI CERRWARN += -_gcc=-Wno-unused-value +SMOFF += indenting + INCS += -I. INCS += -I$(SRC)/lib/smhba/common INCS += -I$(SRC)/lib/hbaapi/common diff --git a/usr/src/cmd/savecore/Makefile.com b/usr/src/cmd/savecore/Makefile.com index ef8185d6d8..1f6e09b231 100644 --- a/usr/src/cmd/savecore/Makefile.com +++ b/usr/src/cmd/savecore/Makefile.com @@ -21,6 +21,7 @@ # # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG= savecore SRCS= ../savecore.c ../../../uts/common/os/compress.c @@ -34,6 +35,9 @@ CFLAGS += $(CCVERBOSE) CFLAGS64 += $(CCVERBOSE) CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -DBZ_NO_STDIO -I$(SRC)/uts/common +# not linted +SMATCH=off + # # savecore is compiled with bits from $(SRC)/common/bzip2 and some function # symbols there are defined as weak; if you leave them out of diff --git a/usr/src/cmd/script/Makefile b/usr/src/cmd/script/Makefile index dc777f0841..c8f3482746 100644 --- a/usr/src/cmd/script/Makefile +++ b/usr/src/cmd/script/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= script @@ -30,9 +31,11 @@ FILEMODE= 0555 CERRWARN += -_gcc=-Wno-unused-variable +SMOFF += all_func_returns + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/setfacl/Makefile b/usr/src/cmd/setfacl/Makefile index 9519ffca23..5d03563af4 100644 --- a/usr/src/cmd/setfacl/Makefile +++ b/usr/src/cmd/setfacl/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1993 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG= setfacl @@ -31,11 +32,14 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + LDLIBS += -lsec .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/sgs/ar/Makefile.com b/usr/src/cmd/sgs/ar/Makefile.com index dcd81c9f7c..e2064d26ea 100644 --- a/usr/src/cmd/sgs/ar/Makefile.com +++ b/usr/src/cmd/sgs/ar/Makefile.com @@ -20,6 +20,7 @@ # # # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # PROG= ar @@ -42,6 +43,9 @@ CFLAGS += $(CCVERBOSE) CSTD= $(CSTD_GNU99) CERRWARN += -_gcc=-Wno-uninitialized + +SMOFF += signed + LDLIBS += -lelf $(CONVLIBDIR) $(CONV_LIB) -lsendfile LINTFLAGS= -x LINTFLAGS64= -x diff --git a/usr/src/cmd/sgs/crle/Makefile.com b/usr/src/cmd/sgs/crle/Makefile.com index 97855725a0..0a26a6845a 100644 --- a/usr/src/cmd/sgs/crle/Makefile.com +++ b/usr/src/cmd/sgs/crle/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= crle @@ -39,6 +40,9 @@ OBJS= $(BLTOBJ) $(COMOBJ) $(TOOLSOBJ) MAPFILE= $(MAPFILE.NGB) MAPOPT= $(MAPFILE:%=-M%) +# not linted +SMATCH=off + CPPFLAGS += -I$(SRC)/common/sgsrtcid -I$(SRCBASE)/uts/$(ARCH)/sys \ -D__EXTENSIONS__ LLDFLAGS = '-R$$ORIGIN/../lib' diff --git a/usr/src/cmd/sgs/dump/Makefile.com b/usr/src/cmd/sgs/dump/Makefile.com index 1d90361f73..4a0d909491 100644 --- a/usr/src/cmd/sgs/dump/Makefile.com +++ b/usr/src/cmd/sgs/dump/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= dump @@ -43,6 +44,8 @@ LDFLAGS += $(LLDFLAGS) CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += indenting + LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf LINTFLAGS += -x LINTSRCS = $(SRCS) diff --git a/usr/src/cmd/sgs/elfdump/Makefile.com b/usr/src/cmd/sgs/elfdump/Makefile.com index b24b9ef4cb..fcc0489e9f 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.com +++ b/usr/src/cmd/sgs/elfdump/Makefile.com @@ -21,6 +21,7 @@ # # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # PROG= elfdump @@ -60,6 +61,9 @@ LINTFLAGS64 += -x CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + BLTDEFS = msg.h BLTDATA = msg.c BLTMESG = $(SGSMSGDIR)/elfdump diff --git a/usr/src/cmd/sgs/error/i386/Makefile b/usr/src/cmd/sgs/error/i386/Makefile index 91b26e49bc..0154fd97fa 100644 --- a/usr/src/cmd/sgs/error/i386/Makefile +++ b/usr/src/cmd/sgs/error/i386/Makefile @@ -24,6 +24,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= error @@ -43,6 +44,8 @@ CSTD= $(CSTD_GNU99) CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses +SMOFF += no_if_block,indenting + CLEANFILES += $(LINTOUT) %.o: ../common/%.c diff --git a/usr/src/cmd/sgs/gprof/Makefile.com b/usr/src/cmd/sgs/gprof/Makefile.com index cb08915388..435f86d0bd 100644 --- a/usr/src/cmd/sgs/gprof/Makefile.com +++ b/usr/src/cmd/sgs/gprof/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/gprof/Makefile.com -# +# Copyright (c) 2018, Joyent, Inc. PROG= gprof @@ -46,6 +45,10 @@ LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf LINTSRCS = $(SRCS) LINTFLAGS += -x CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off + CLEANFILES += $(LINTOUTS) ROOTLIBBLURB= $(BLURBS:%=$(ROOTSHLIBCCS)/%) diff --git a/usr/src/cmd/sgs/ldd/Makefile.com b/usr/src/cmd/sgs/ldd/Makefile.com index bf52b37760..6530a3e5cb 100644 --- a/usr/src/cmd/sgs/ldd/Makefile.com +++ b/usr/src/cmd/sgs/ldd/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= ldd @@ -48,6 +49,8 @@ LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lelf $(DLLIB) LINTFLAGS += -x LINTFLAGS64 += -x +SMOFF += or_vs_and + BLTDEFS= msg.h BLTDATA= msg.c BLTMESG= $(SGSMSGDIR)/ldd diff --git a/usr/src/cmd/sgs/ldprof/Makefile.com b/usr/src/cmd/sgs/ldprof/Makefile.com index 1e7a111101..f5ebebd867 100644 --- a/usr/src/cmd/sgs/ldprof/Makefile.com +++ b/usr/src/cmd/sgs/ldprof/Makefile.com @@ -21,6 +21,7 @@ # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # LIBRARY= ldprof.a @@ -47,6 +48,8 @@ CPPFLAGS= -I. -I../common -I../../include \ $(CPPFLAGS.master) -I$(ELFCAP) CFLAGS += $(C_PICFLAGS) +SMOFF += indenting + lint := ZRECORD = LDLIBS += $(ZRECORD) -lmapmalloc -lc $(DLLIB) diff --git a/usr/src/cmd/sgs/libconv/Makefile.com b/usr/src/cmd/sgs/libconv/Makefile.com index 1bb482f706..3f095a9aeb 100644 --- a/usr/src/cmd/sgs/libconv/Makefile.com +++ b/usr/src/cmd/sgs/libconv/Makefile.com @@ -91,6 +91,9 @@ include $(SRC)/cmd/sgs/Makefile.com CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-switch +# not linted +SMATCH=off + CTFCONVERT_O= README_REVISION=../../packages/common/readme_revision diff --git a/usr/src/cmd/sgs/libelf/Makefile.com b/usr/src/cmd/sgs/libelf/Makefile.com index 5a6d7e0a5d..90c360940b 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.com +++ b/usr/src/cmd/sgs/libelf/Makefile.com @@ -21,6 +21,7 @@ # # Copyright 2015 Gary Mills # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # LIBRARY= libelf.a @@ -71,6 +72,8 @@ LINTFLAGS64 += -u -erroff=E_CAST_INT_TO_SMALL_INT CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += indenting + BUILD.AR= $(RM) $@ ; \ $(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)` $(POST_PROCESS_A) diff --git a/usr/src/cmd/sgs/libld/Makefile.com b/usr/src/cmd/sgs/libld/Makefile.com index 0141955f16..08efdd8315 100644 --- a/usr/src/cmd/sgs/libld/Makefile.com +++ b/usr/src/cmd/sgs/libld/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. LIBRARY = libld.a VERS = .4 @@ -94,6 +95,8 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-type-limits +SMOFF += no_if_block + # Location of the shared relocation engines maintained under usr/src/uts. # KRTLD_I386 = $(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld diff --git a/usr/src/cmd/sgs/nm/amd64/Makefile b/usr/src/cmd/sgs/nm/amd64/Makefile index 72bbbbb1d4..d5957d006d 100644 --- a/usr/src/cmd/sgs/nm/amd64/Makefile +++ b/usr/src/cmd/sgs/nm/amd64/Makefile @@ -22,6 +22,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= nm @@ -43,6 +44,8 @@ CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += precedence,indenting + LDLIBS += $(CONVLIBDIR64) $(CONV_LIB) $(ELFLIBDIR) -lelf LINTFLAGS64 += -x $(LDLIBS) -m64 LINTSRCS= $(SRCS) diff --git a/usr/src/cmd/sgs/nm/i386/Makefile b/usr/src/cmd/sgs/nm/i386/Makefile index f351d68aca..52920c1515 100644 --- a/usr/src/cmd/sgs/nm/i386/Makefile +++ b/usr/src/cmd/sgs/nm/i386/Makefile @@ -21,8 +21,7 @@ # # Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. # -# cmd/sgs/nm/i386/Makefile -# +# Copyright (c) 2018, Joyent, Inc. PROG= nm XPG4PROG= nm @@ -47,6 +46,8 @@ CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += precedence,indenting + LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf LINTFLAGS += -x $(LDLIBS) LINTSRCS= $(SRCS) diff --git a/usr/src/cmd/sgs/prof/Makefile.com b/usr/src/cmd/sgs/prof/Makefile.com index f35c626e36..d4d97ed062 100644 --- a/usr/src/cmd/sgs/prof/Makefile.com +++ b/usr/src/cmd/sgs/prof/Makefile.com @@ -22,8 +22,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/prof/Makefile.com -# +# Copyright (c) 2018, Joyent, Inc. PROG= prof @@ -43,6 +42,10 @@ CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) CFLAGS += $(CCVERBOSE) CSTD= $(CSTD_GNU99) CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off + LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf LINTSRCS = $(SRCS) LINTFLAGS += -x diff --git a/usr/src/cmd/sgs/pvs/Makefile.com b/usr/src/cmd/sgs/pvs/Makefile.com index a66d6c93b8..34755fbc99 100644 --- a/usr/src/cmd/sgs/pvs/Makefile.com +++ b/usr/src/cmd/sgs/pvs/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= pvs @@ -48,6 +49,9 @@ LDLIBS += $(LDDBGLIBDIR) $(LDDBG_LIB) $(ELFLIBDIR) -lelf \ LINTFLAGS += -x LINTFLAGS64 += -x +# not linted +SMATCH=off + BLTDEFS= msg.h BLTDATA= msg.c BLTMESG= $(SGSMSGDIR)/pvs diff --git a/usr/src/cmd/sgs/rtld/Makefile.com b/usr/src/cmd/sgs/rtld/Makefile.com index 037141b7a4..22faa8f960 100644 --- a/usr/src/cmd/sgs/rtld/Makefile.com +++ b/usr/src/cmd/sgs/rtld/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. RTLD= ld.so.1 @@ -89,6 +90,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-switch +# not linted +SMATCH=off + # These definitions require that libc be built in the same workspace # as the run-time linker and before the run-time linker is built. # This is required for the system's self-consistency in any case. @@ -100,7 +104,7 @@ LDLIBS += $(CONVLIBDIR) $(CONV_LIB) \ $(CPICLIB) $(CLIB) \ $(LDDBGLIBDIR) $(LDDBG_LIB) \ $(RTLDLIB) -lrtld \ - $(LDLIB) $(LD_LIB) + $(LDLIB) $(LD_LIB) DYNFLAGS += -i -e _rt_boot $(VERSREF) $(ZNODLOPEN) \ $(ZINTERPOSE) -zdtrace=dtrace_data '-R$$ORIGIN' diff --git a/usr/src/cmd/sgs/tools/Makefile.com b/usr/src/cmd/sgs/tools/Makefile.com index 6c7ba8f99d..b3180c50d2 100644 --- a/usr/src/cmd/sgs/tools/Makefile.com +++ b/usr/src/cmd/sgs/tools/Makefile.com @@ -18,6 +18,7 @@ # # CDDL HEADER END # +# Copyright (c) 2018, Joyent, Inc. # # Copyright 2010 Sun Microsystems, Inc. All rights reserved. @@ -66,3 +67,6 @@ ROOTDIR= $(ROOT)/opt/SUNWonld ROOTPROGS= $(PROGS:%=$(ROOTDIR)/bin/%) FILEMODE= 0755 + +# not linted +SMATCH=off diff --git a/usr/src/cmd/sgs/yacc/Makefile.com b/usr/src/cmd/sgs/yacc/Makefile.com index 07782396a5..dca8fa416d 100644 --- a/usr/src/cmd/sgs/yacc/Makefile.com +++ b/usr/src/cmd/sgs/yacc/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= yacc @@ -74,6 +75,9 @@ CFLAGS64 += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + $(ROOTPROG):= FILEMODE = 0555 ROOTYACCPAR= $(YACCPAR:%=$(ROOTSHLIBCCS)/%) diff --git a/usr/src/cmd/sh/Makefile b/usr/src/cmd/sh/Makefile index f1b67294ce..bb8852b978 100644 --- a/usr/src/cmd/sh/Makefile +++ b/usr/src/cmd/sh/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG = sh USR_PROG = $(PROG) @@ -45,6 +46,10 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-extra CERRWARN += -_gcc=-Wno-unused-variable + +# unknown type for func +SMATCH=off + MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) LDFLAGS += $(MAPFILES:%=-M%) LDLIBS += -lgen diff --git a/usr/src/cmd/shcomp/Makefile b/usr/src/cmd/shcomp/Makefile index 03fd752784..568d9c70f1 100644 --- a/usr/src/cmd/shcomp/Makefile +++ b/usr/src/cmd/shcomp/Makefile @@ -23,6 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. SHELL=/usr/bin/ksh93 @@ -63,6 +64,8 @@ CFLAGS64 += \ CERRWARN += -_gcc=-Wno-parentheses +SMOFF += all_func_returns + ROOTCMDDIR=$(ROOT)/usr/bin PROG= shcomp diff --git a/usr/src/cmd/smbsrv/smbadm/Makefile b/usr/src/cmd/smbsrv/smbadm/Makefile index a31acdef20..bfcac47d98 100644 --- a/usr/src/cmd/smbsrv/smbadm/Makefile +++ b/usr/src/cmd/smbsrv/smbadm/Makefile @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright 2014 Nexenta Systems, Inc. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # PROG= smbadm @@ -38,6 +39,8 @@ LDFLAGS += -R/usr/lib/smbsrv CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += free + all: $(PROG) clean: diff --git a/usr/src/cmd/smserverd/Makefile b/usr/src/cmd/smserverd/Makefile index f138639025..ac01543191 100644 --- a/usr/src/cmd/smserverd/Makefile +++ b/usr/src/cmd/smserverd/Makefile @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = rpc.smserverd OBJS = smediad.o smediad_err.o myaudit.o smed_svc.o smed_xdr.o @@ -47,6 +48,10 @@ CPPFLAGS += -D_REENTRANT CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable + +# not linted +SMATCH=off + LINTFLAGS += -u .KEEP_STATE: diff --git a/usr/src/cmd/soelim/Makefile b/usr/src/cmd/soelim/Makefile index 1dc7c5890b..5f70540a23 100644 --- a/usr/src/cmd/soelim/Makefile +++ b/usr/src/cmd/soelim/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.cmd @@ -33,6 +34,9 @@ SRCS = $(OBJS:%.o=%.c) CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + all : $(PROG) $(PROG) : soelim.o diff --git a/usr/src/cmd/sort/Makefile.com b/usr/src/cmd/sort/Makefile.com index a65ab5327a..ef195b2ce1 100644 --- a/usr/src/cmd/sort/Makefile.com +++ b/usr/src/cmd/sort/Makefile.com @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # # Debugging targets @@ -88,6 +89,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + $(XPG4) := CFLAGS += -DXPG4 debug := SORT_DEBUG = -g -DDEBUG $(ILDOFF) diff --git a/usr/src/cmd/sqlite/Makefile b/usr/src/cmd/sqlite/Makefile index 795e391c96..8e9e672965 100644 --- a/usr/src/cmd/sqlite/Makefile +++ b/usr/src/cmd/sqlite/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= sqlite @@ -40,6 +41,9 @@ $(OBJS) := CTFCONVERT_POST = $(CTFCONVERT_O) CERRWARN += -_gcc=-Wno-empty-body +# not linted +SMATCH=off + LDLIBS += -lsqlite-sys .KEEP_STATE: diff --git a/usr/src/cmd/ssh/etc/Makefile b/usr/src/cmd/ssh/etc/Makefile index 1525d642b0..66a60e0705 100644 --- a/usr/src/cmd/ssh/etc/Makefile +++ b/usr/src/cmd/ssh/etc/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. MANIFEST = ssh.xml SVCMETHOD = sshd @@ -46,6 +47,8 @@ $(DIRS): $(POFILE): +SMOFF += signed + all lint clean clobber _msg: install: all $(DIRS) $(ETCSSHFILES) $(ROOTMANIFEST) $(ROOTSVCMETHOD) diff --git a/usr/src/cmd/stat/fsstat/Makefile b/usr/src/cmd/stat/fsstat/Makefile index b86e2cc8f7..a1aa7a883a 100644 --- a/usr/src/cmd/stat/fsstat/Makefile +++ b/usr/src/cmd/stat/fsstat/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = fsstat OBJS = fsstat.o @@ -40,6 +41,8 @@ FILEMODE= 0555 lint := LINTFLAGS = -muxs -I$(STATCOMMONDIR) +SMOFF += signed + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/stat/vmstat/Makefile b/usr/src/cmd/stat/vmstat/Makefile index d6f65b98d0..6827f634a7 100644 --- a/usr/src/cmd/stat/vmstat/Makefile +++ b/usr/src/cmd/stat/vmstat/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = vmstat OBJS = vmstat.o @@ -35,6 +36,9 @@ CFLAGS += $(CCVERBOSE) -I${STATCOMMONDIR} CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses + +SMOFF += signed + FILEMODE= 0555 lint := LINTFLAGS = -muxs -I$(STATCOMMONDIR) diff --git a/usr/src/cmd/streams/log/Makefile b/usr/src/cmd/streams/log/Makefile index 67909774a1..ae49471a01 100644 --- a/usr/src/cmd/streams/log/Makefile +++ b/usr/src/cmd/streams/log/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= strace strerr strclean @@ -29,11 +30,13 @@ include ../../Makefile.cmd CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-variable +SMOFF += all_func_returns + FILEMODE= 0555 .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) -$(RM) $(ROOTBIN)/strace diff --git a/usr/src/cmd/sulogin/Makefile b/usr/src/cmd/sulogin/Makefile index caa77495e8..f6904820fd 100644 --- a/usr/src/cmd/sulogin/Makefile +++ b/usr/src/cmd/sulogin/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = sulogin ROOTFS_PROG = $(PROG) @@ -32,6 +33,9 @@ LDLIBS += -lsecdb FILEMODE = 0555 +# not linted +SMATCH=off + .KEEP_STATE: all: $(ROOTFS_PROG) diff --git a/usr/src/cmd/sunpc/other/Makefile b/usr/src/cmd/sunpc/other/Makefile index b5434c8597..bd366ffe4e 100644 --- a/usr/src/cmd/sunpc/other/Makefile +++ b/usr/src/cmd/sunpc/other/Makefile @@ -22,7 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # -# cmd/sunpc/other/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= dos2unix unix2dos SRCS= ${PROG:%=%.c} @@ -33,6 +33,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/svc/startd/Makefile b/usr/src/cmd/svc/startd/Makefile index 0479bc97b8..1f71fdbc6c 100644 --- a/usr/src/cmd/svc/startd/Makefile +++ b/usr/src/cmd/svc/startd/Makefile @@ -22,6 +22,7 @@ # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2012 Milan Jurik. All rights reserved. # Copyright 2016 Toomas Soome <tsoome@me.com> +# Copyright (c) 2018, Joyent, Inc. # PROG = svc.startd @@ -72,6 +73,9 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized +# these look like real bugs here, but ... +SMOFF += impossible_mask,signed_integer_overflow_check + $(OBJS) := CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT proc.o := CPPFLAGS += -D_REENTRANT diff --git a/usr/src/cmd/svc/svccfg/Makefile b/usr/src/cmd/svc/svccfg/Makefile index 8fa86739a0..fc42a8b0c3 100644 --- a/usr/src/cmd/svc/svccfg/Makefile +++ b/usr/src/cmd/svc/svccfg/Makefile @@ -21,7 +21,7 @@ # # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2017 Joyent, Inc. +# Copyright (c) 2018, Joyent, Inc. # MYPROG = svccfg @@ -81,6 +81,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + LFLAGS = -t YFLAGS = -d diff --git a/usr/src/cmd/svr4pkg/Makefile.svr4pkg b/usr/src/cmd/svr4pkg/Makefile.svr4pkg index fc343556fc..ff43ccf865 100644 --- a/usr/src/cmd/svr4pkg/Makefile.svr4pkg +++ b/usr/src/cmd/svr4pkg/Makefile.svr4pkg @@ -24,6 +24,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. include $(SRC)/cmd/Makefile.cmd @@ -38,6 +39,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-address +# multiple issues in this old code +SMATCH=off + LIBINST = $(SRC)/cmd/svr4pkg/libinst/libinst.a SRCS= $(OBJS:.o=.c) diff --git a/usr/src/cmd/svr4pkg/libinst/Makefile b/usr/src/cmd/svr4pkg/libinst/Makefile index 3da766690a..9abf6ebd7a 100644 --- a/usr/src/cmd/svr4pkg/libinst/Makefile +++ b/usr/src/cmd/svr4pkg/libinst/Makefile @@ -24,6 +24,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= libinst.a @@ -68,6 +69,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-unused-variable +# too many issues +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/swap/Makefile.com b/usr/src/cmd/swap/Makefile.com index 0514c15e62..54361a42d5 100644 --- a/usr/src/cmd/swap/Makefile.com +++ b/usr/src/cmd/swap/Makefile.com @@ -22,7 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/swap/Makefile.com +# Copyright (c) 2018, Joyent, Inc. PROG= swap OBJS= $(PROG).o @@ -35,6 +35,9 @@ CPPFLAGS += -D_LARGEFILE64_SOURCE CFLAGS64 += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + FILEMODE=02555 CLEANFILES += $(OBJS) diff --git a/usr/src/cmd/sysdef/Makefile.com b/usr/src/cmd/sysdef/Makefile.com index 05ded4a1c8..ae6c6d58f1 100644 --- a/usr/src/cmd/sysdef/Makefile.com +++ b/usr/src/cmd/sysdef/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= sysdef OBJS= $(PROG).o sdevinfo.o @@ -32,6 +33,9 @@ include ../../Makefile.cmd LDLIBS += -ldevinfo -lelf CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + FILEMODE= 02555 CLEANFILES += $(OBJS) diff --git a/usr/src/cmd/syslogd/Makefile.com b/usr/src/cmd/syslogd/Makefile.com index 93b2a94dd4..0898493b3d 100644 --- a/usr/src/cmd/syslogd/Makefile.com +++ b/usr/src/cmd/syslogd/Makefile.com @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= syslogd ROTATESCRIPT= newsyslog @@ -35,6 +36,10 @@ include ../../Makefile.cmd $(PROG) lint := LDLIBS += -lscf -lnsl CERRWARN += -_gcc=-Wno-uninitialized + +# not linted +SMATCH=off + CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT CFLAGS += -DNDEBUG diff --git a/usr/src/cmd/tabs/Makefile b/usr/src/cmd/tabs/Makefile index 9a5e534cc4..63d3f92983 100644 --- a/usr/src/cmd/tabs/Makefile +++ b/usr/src/cmd/tabs/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= tabs @@ -33,6 +34,9 @@ CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/tail/Makefile b/usr/src/cmd/tail/Makefile index 52e433c7be..6f50c71fb7 100644 --- a/usr/src/cmd/tail/Makefile +++ b/usr/src/cmd/tail/Makefile @@ -11,6 +11,7 @@ # # Copyright 2010 Chris Love. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # @@ -29,6 +30,8 @@ CSTD= $(CSTD_GNU99) C99LMODE= -Xc99=%all LINTFLAGS += -I. -erroff=E_CONSTANT_CONDITION +SMOFF += leaks + # install rules $(ROOTINC)/% : % $(INS.file) @@ -37,7 +40,7 @@ $(ROOTINC)/% : % .PARALLEL: $(OBJS) -all: $(PROG) +all: $(PROG) $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) diff --git a/usr/src/cmd/tar/Makefile b/usr/src/cmd/tar/Makefile index 93a02e58e0..9a026b00b4 100644 --- a/usr/src/cmd/tar/Makefile +++ b/usr/src/cmd/tar/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # PROG= tar @@ -39,6 +40,9 @@ LDLIBS += -lsec -lcmdutils -lnvpair -ltsol CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + CPPFLAGS += -DEUC ROOTSYMLINK= $(ROOTPROG) diff --git a/usr/src/cmd/tbl/Makefile b/usr/src/cmd/tbl/Makefile index 8213f9bf01..cae02cb4f7 100644 --- a/usr/src/cmd/tbl/Makefile +++ b/usr/src/cmd/tbl/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. include ../Makefile.cmd @@ -41,6 +42,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-char-subscripts +# not linted +SMATCH=off + .KEEP_STATE : all : $(PROG) diff --git a/usr/src/cmd/tcopy/Makefile b/usr/src/cmd/tcopy/Makefile index d5813abe94..3e29556b5f 100644 --- a/usr/src/cmd/tcopy/Makefile +++ b/usr/src/cmd/tcopy/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1990 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG = tcopy @@ -32,6 +33,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-extra +# not linted +SMATCH=off + .KEEP_STATE : all: $(PROG) diff --git a/usr/src/cmd/tcpd/Makefile b/usr/src/cmd/tcpd/Makefile index ec4d3c4876..1697a5e325 100644 --- a/usr/src/cmd/tcpd/Makefile +++ b/usr/src/cmd/tcpd/Makefile @@ -4,6 +4,7 @@ # # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG= safe_finger tcpd tcpdchk tcpdmatch try-from @@ -29,6 +30,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-return-type CERRWARN += -_gcc=-Wno-clobbered +# not linted +SMATCH=off + # Various components must export interfaces, but also contain name-space # clashes with system libraries. MAPFILE.INT.D= $(MAPFILE.NGB) mapfile-intf-tcpdchk diff --git a/usr/src/cmd/tnf/prex/Makefile.com b/usr/src/cmd/tnf/prex/Makefile.com index 6a25466978..871583d0aa 100644 --- a/usr/src/cmd/tnf/prex/Makefile.com +++ b/usr/src/cmd/tnf/prex/Makefile.com @@ -24,8 +24,7 @@ # Copyright 1989,2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/tnf/prex/Makefile.com -# +# Copyright (c) 2018, Joyent, Inc. PROG= prex @@ -72,6 +71,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: .PARALLEL: $(OBJS) diff --git a/usr/src/cmd/tnf/tnfxtract/Makefile.com b/usr/src/cmd/tnf/tnfxtract/Makefile.com index 3916b9ca6f..dc5b2ea811 100644 --- a/usr/src/cmd/tnf/tnfxtract/Makefile.com +++ b/usr/src/cmd/tnf/tnfxtract/Makefile.com @@ -23,6 +23,7 @@ # Copyright 1994, 2002 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= tnfxtract @@ -38,6 +39,9 @@ LFLAGS= -v LDLIBS += -lkvm CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/tput/Makefile b/usr/src/cmd/tput/Makefile index 80cd77e8f1..7d8d338c3b 100644 --- a/usr/src/cmd/tput/Makefile +++ b/usr/src/cmd/tput/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= tput @@ -35,6 +36,9 @@ CERRWARN += -_gcc=-Wno-parentheses XGETFLAGS += -a -x tput.xcl LDLIBS += -lcurses +# not linted +SMATCH=off + all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/truss/Makefile.com b/usr/src/cmd/truss/Makefile.com index e2951b1f35..bb49c12894 100644 --- a/usr/src/cmd/truss/Makefile.com +++ b/usr/src/cmd/truss/Makefile.com @@ -23,8 +23,7 @@ # Copyright (c) 2016 by Delphix. All rights reserved. # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# -# cmd/truss/Makefile.com +# Copyright (c) 2018, Joyent, Inc. # PROG= truss @@ -42,6 +41,9 @@ CFLAGS64 += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-switch +# not linted +SMATCH=off + CSTD= $(CSTD_GNU99) LDLIBS += -lproc -lrtld_db -lc_db -lnsl -lsocket -ltsol -lnvpair diff --git a/usr/src/cmd/tsol/tnd/Makefile b/usr/src/cmd/tsol/tnd/Makefile index 247a680358..16800bac63 100644 --- a/usr/src/cmd/tsol/tnd/Makefile +++ b/usr/src/cmd/tsol/tnd/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= tnd OBJS= tnd.o @@ -47,6 +48,8 @@ CPPFLAGS += -DDEBUG CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-parentheses +SMOFF += no_if_block + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/ttymon/Makefile b/usr/src/cmd/ttymon/Makefile index 854e5e8d95..05178e2e4c 100644 --- a/usr/src/cmd/ttymon/Makefile +++ b/usr/src/cmd/ttymon/Makefile @@ -23,6 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= stty ttymon ttyadm sttydefs XPG4PROG= stty @@ -78,6 +79,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-extra +# not linted +SMATCH=off + # # Message catalog # diff --git a/usr/src/cmd/units/Makefile b/usr/src/cmd/units/Makefile index b6455296de..d68464efa9 100644 --- a/usr/src/cmd/units/Makefile +++ b/usr/src/cmd/units/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. PROG= units UNITTAB=unittab @@ -31,6 +32,9 @@ include ../Makefile.cmd CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-implicit-function-declaration +# not linted +SMATCH=off + LIBUNITTAB= $(UNITTAB:%=$(ROOTSHLIB)/%) $(LIBUNITTAB) := FILEMODE = $(LIBFILEMODE) diff --git a/usr/src/cmd/unlink/Makefile b/usr/src/cmd/unlink/Makefile index 78cb745acd..aa24d3401d 100644 --- a/usr/src/cmd/unlink/Makefile +++ b/usr/src/cmd/unlink/Makefile @@ -21,6 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= unlink @@ -30,9 +31,12 @@ FILEMODE = 0555 CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) -$(RM) $(ROOTETCPROG) diff --git a/usr/src/cmd/utmpd/Makefile b/usr/src/cmd/utmpd/Makefile index 611c1f36dd..74a1561e64 100644 --- a/usr/src/cmd/utmpd/Makefile +++ b/usr/src/cmd/utmpd/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= utmpd DEFAULTFILES= utmpd.dfl @@ -34,6 +35,8 @@ ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) FILEMODE = 555 +SMOFF += signed + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/vgrind/Makefile b/usr/src/cmd/vgrind/Makefile index 0bb0619aa2..1a1eb08217 100644 --- a/usr/src/cmd/vgrind/Makefile +++ b/usr/src/cmd/vgrind/Makefile @@ -22,7 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/vgrind/Makefile +# Copyright (c) 2018, Joyent, Inc. # # These are the objects associated with the overall vgrind command. @@ -66,6 +66,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + # # Message catalog # diff --git a/usr/src/cmd/vi/misc/Makefile b/usr/src/cmd/vi/misc/Makefile index d124adae63..3b75bb32de 100644 --- a/usr/src/cmd/vi/misc/Makefile +++ b/usr/src/cmd/vi/misc/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2018, Joyent, Inc. CFLAGS += v @@ -36,7 +37,7 @@ TXTS= READ_ME del.h.cb mkstr.c xstr.c POFILES= $(SRCS:%.c=%.po) include ../../Makefile.cmd -$(XPG4) := CFLAGS += -DXPG4 +$(XPG4) := CFLAGS += -DXPG4 CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-parentheses @@ -44,6 +45,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable +# way too old +SMATCH=off + POFILE= misc.po CLOBBERFILES += $(OTHERPROGS) diff --git a/usr/src/cmd/vi/port/Makefile b/usr/src/cmd/vi/port/Makefile index eb22a5e54e..c74e8cbdbc 100644 --- a/usr/src/cmd/vi/port/Makefile +++ b/usr/src/cmd/vi/port/Makefile @@ -23,6 +23,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. # cmd/vi/port/Makefile @@ -61,6 +62,9 @@ CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-address +# way too old +SMATCH=off + # # For message catalogue files # diff --git a/usr/src/cmd/volcheck/Makefile b/usr/src/cmd/volcheck/Makefile index 8f95cb5b10..d3ee4572a1 100644 --- a/usr/src/cmd/volcheck/Makefile +++ b/usr/src/cmd/volcheck/Makefile @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = volcheck LOCAL_OBJS = volcheck.o @@ -47,6 +48,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/volrmmount/Makefile b/usr/src/cmd/volrmmount/Makefile index f503dc768a..848088070c 100644 --- a/usr/src/cmd/volrmmount/Makefile +++ b/usr/src/cmd/volrmmount/Makefile @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = volrmmount LOCAL_OBJS = volrmmount.o @@ -47,6 +48,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/vscan/vscand/Makefile b/usr/src/cmd/vscan/vscand/Makefile index dfc363c83d..6b4e85550d 100644 --- a/usr/src/cmd/vscan/vscand/Makefile +++ b/usr/src/cmd/vscan/vscand/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = vscand SRCS = vs_main.c \ @@ -46,6 +47,9 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG CERRWARN += -_gcc=-Wno-switch +# not linted +SMATCH=off + LINTFLAGS += -mu CSTD = $(CSTD_GNU99) C99LMODE = -Xc99=%all diff --git a/usr/src/cmd/wall/Makefile b/usr/src/cmd/wall/Makefile index 344209d5a7..f593e0095b 100644 --- a/usr/src/cmd/wall/Makefile +++ b/usr/src/cmd/wall/Makefile @@ -21,7 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Copyright 2012 Joyent, Inc. All Rights Reserved. +# Copyright (c) 2018, Joyent, Inc. # PROG= wall @@ -34,9 +34,11 @@ LDLIBS += -lzonecfg -lcontract CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += leaks + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTUSRSBINPROG) -$(RM) $(ROOTETCPROG) diff --git a/usr/src/cmd/whodo/amd64/Makefile b/usr/src/cmd/whodo/amd64/Makefile index de6f95e9d1..1ca54c60d3 100644 --- a/usr/src/cmd/whodo/amd64/Makefile +++ b/usr/src/cmd/whodo/amd64/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= whodo @@ -35,6 +36,8 @@ include ../../Makefile.cmd.64 CFLAGS64 += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses +SMOFF += strcpy_overflow + FILEMODE= 04555 .KEEP_STATE: diff --git a/usr/src/cmd/write/Makefile b/usr/src/cmd/write/Makefile index 74ffb5e953..56c4911aa6 100644 --- a/usr/src/cmd/write/Makefile +++ b/usr/src/cmd/write/Makefile @@ -21,7 +21,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/write/Makefile +# Copyright (c) 2018, Joyent, Inc. PROG= write @@ -38,6 +38,8 @@ XGETFLAGS += -a -x write.xcl CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-variable +SMOFF += all_func_returns + all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/xargs/Makefile b/usr/src/cmd/xargs/Makefile index b4e136d8a6..d6491dd2bb 100644 --- a/usr/src/cmd/xargs/Makefile +++ b/usr/src/cmd/xargs/Makefile @@ -22,6 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= xargs # /usr/xpg6/bin/xargs is a symlink to /usr/bin/xargs @@ -38,6 +39,9 @@ LINTFLAGS += -u CERRWARN += -_gcc=-Wno-parentheses +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/ypcmd/Makefile b/usr/src/cmd/ypcmd/Makefile index f39194c092..aeefa3031e 100644 --- a/usr/src/cmd/ypcmd/Makefile +++ b/usr/src/cmd/ypcmd/Makefile @@ -22,6 +22,7 @@ # Copyright 2015 Gary Mills # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# Copyright (c) 2018, Joyent, Inc. # BINPROG = ypmatch ypwhich ypcat @@ -153,6 +154,9 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-address CERRWARN += -_gcc=-Wno-unused-function +# too many unknown types +SMATCH = off + #conditional assignments ypalias.o := CPPFLAGS= -DMAIN $(CPPFLAGS.master) makedbm.o := CPPFLAGS= $(CPPFLAGS.master) diff --git a/usr/src/cmd/ypcmd/mknetid/Makefile b/usr/src/cmd/ypcmd/mknetid/Makefile index e336bef421..853fb1ec3b 100644 --- a/usr/src/cmd/ypcmd/mknetid/Makefile +++ b/usr/src/cmd/ypcmd/mknetid/Makefile @@ -23,6 +23,7 @@ # Copyright 1994, 2002 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = mknetid @@ -37,6 +38,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/ypcmd/revnetgroup/Makefile b/usr/src/cmd/ypcmd/revnetgroup/Makefile index 82a979b837..7494d1ceef 100644 --- a/usr/src/cmd/ypcmd/revnetgroup/Makefile +++ b/usr/src/cmd/ypcmd/revnetgroup/Makefile @@ -23,6 +23,7 @@ # Copyright 1996, 2002 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG = revnetgroup @@ -36,6 +37,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) @@ -46,7 +50,7 @@ $(PROG): $(OBJS) install: all $(ROOTUSRSBINPROG) -clean: +clean: $(RM) $(OBJS) lint: diff --git a/usr/src/cmd/ypcmd/yppasswd/Makefile b/usr/src/cmd/ypcmd/yppasswd/Makefile index 1906d7bcf7..db9d000e49 100644 --- a/usr/src/cmd/ypcmd/yppasswd/Makefile +++ b/usr/src/cmd/ypcmd/yppasswd/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. NETYPPROG = rpc.yppasswdd DEFAULTFILES = yppasswdd.dfl @@ -60,6 +61,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + # # Objects shared between all the major components # diff --git a/usr/src/cmd/ypcmd/ypupdated/Makefile b/usr/src/cmd/ypcmd/ypupdated/Makefile index ea5a7483ad..36f6cd4c1b 100644 --- a/usr/src/cmd/ypcmd/ypupdated/Makefile +++ b/usr/src/cmd/ypcmd/ypupdated/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. NETYPPROG = rpc.ypupdated PROG = $(NETYPPROG) @@ -55,6 +56,9 @@ SRCS = $(OBJS:%.o=%.c) CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-unused-variable +# not linted +SMATCH=off + CLOBBERFILES += ypupdated_prot.h #conditional assignments diff --git a/usr/src/cmd/zdb/Makefile.com b/usr/src/cmd/zdb/Makefile.com index 1870ccd0c5..b90b5810e7 100644 --- a/usr/src/cmd/zdb/Makefile.com +++ b/usr/src/cmd/zdb/Makefile.com @@ -23,7 +23,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # Copyright (c) 2012 by Delphix. All rights reserved. -# Copyright 2017 Joyent, Inc. +# Copyright (c) 2018, Joyent, Inc. # Copyright 2017 RackTop Systems. # @@ -54,6 +54,8 @@ CERRWARN += -_gcc=-Wmissing-braces CERRWARN += -_gcc=-Wsign-compare CERRWARN += -_gcc=-Wmissing-field-initializers +SMOFF += 64bit_shift,all_func_returns + # lint complains about unused _umem_* functions LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2 diff --git a/usr/src/cmd/zlogin/Makefile b/usr/src/cmd/zlogin/Makefile index b498823b07..70ecb28c5c 100644 --- a/usr/src/cmd/zlogin/Makefile +++ b/usr/src/cmd/zlogin/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG = zlogin @@ -33,6 +34,9 @@ FILEMODE = 0555 CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/zonecfg/Makefile b/usr/src/cmd/zonecfg/Makefile index ae8f5c11d1..dc4dc5a16e 100644 --- a/usr/src/cmd/zonecfg/Makefile +++ b/usr/src/cmd/zonecfg/Makefile @@ -22,6 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= zonecfg OBJS= zonecfg.o zonecfg_lex.o zonecfg_grammar.tab.o @@ -46,6 +47,8 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-implicit-function-declaration +SMOFF += all_func_returns + CLOBBERFILES += $(PROG).ln .KEEP_STATE: diff --git a/usr/src/cmd/zonestat/zonestat/Makefile b/usr/src/cmd/zonestat/zonestat/Makefile index 1caf1a8218..64e2314de5 100644 --- a/usr/src/cmd/zonestat/zonestat/Makefile +++ b/usr/src/cmd/zonestat/zonestat/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG = zonestat SRCS = zonestat.c @@ -33,6 +34,9 @@ LINTFLAGS += -u CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + .KEEP_STATE: .PARALLEL: diff --git a/usr/src/cmd/zonestat/zonestatd/Makefile b/usr/src/cmd/zonestat/zonestatd/Makefile index 169e995585..5f27190f10 100644 --- a/usr/src/cmd/zonestat/zonestatd/Makefile +++ b/usr/src/cmd/zonestat/zonestatd/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2018, Joyent, Inc. MANIFEST = zonestat.xml SVCMETHOD = svc-zonestat @@ -42,6 +43,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized +# not linted +SMATCH=off + OBJS = $(SRCS:%.c=%.o) .KEEP_STATE: diff --git a/usr/src/cmd/zstreamdump/Makefile b/usr/src/cmd/zstreamdump/Makefile index ba249bafab..92d7ed4da3 100644 --- a/usr/src/cmd/zstreamdump/Makefile +++ b/usr/src/cmd/zstreamdump/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. PROG= zstreamdump OBJS= zstreamdump.o @@ -47,6 +48,9 @@ LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2 CERRWARN += -_gcc=-Wno-switch +# not linted +SMATCH=off + .KEEP_STATE: .PARALLEL: diff --git a/usr/src/cmd/ztest/Makefile.com b/usr/src/cmd/ztest/Makefile.com index 8f6c9d5ccf..4f0ea21a0f 100644 --- a/usr/src/cmd/ztest/Makefile.com +++ b/usr/src/cmd/ztest/Makefile.com @@ -22,7 +22,7 @@ # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, 2016 by Delphix. All rights reserved. # Copyright 2017 RackTop Systems. -# +# Copyright (c) 2018, Joyent, Inc. PROG= ztest OBJS= $(PROG).o @@ -57,6 +57,9 @@ LINTFLAGS64 += -erroff=E_STATIC_UNUSED CERRWARN += -_gcc=-Wno-switch +# false positive +SMOFF += signed + .KEEP_STATE: all: $(PROG) |