summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2018-12-17 21:29:17 +0000
committerRobert Mustacchi <rm@joyent.com>2019-01-14 18:05:55 +0000
commitcadd68ea0014761eda6a293664086dfa80686d85 (patch)
treedce17598c04e846515a7e82fc151de8ef5590519 /usr/src
parent1ea94c756c0bc9170021d7b570944a24f224c03f (diff)
downloadillumos-joyent-cadd68ea0014761eda6a293664086dfa80686d85.tar.gz
10078 smatch fixes for UCB
Reviewed by: Andy Fiddaman <omnios@citrus-it.net> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/ucbcmd/Makefile.ucbcmd4
-rw-r--r--usr/src/ucblib/libcurses/Makefile.com4
-rw-r--r--usr/src/ucblib/libdbm/dbm.c16
-rw-r--r--usr/src/ucblib/librpcsoc/Makefile.com4
-rw-r--r--usr/src/ucblib/libtermcap/Makefile.com4
-rw-r--r--usr/src/ucblib/libucb/Makefile.com4
6 files changed, 30 insertions, 6 deletions
diff --git a/usr/src/ucbcmd/Makefile.ucbcmd b/usr/src/ucbcmd/Makefile.ucbcmd
index e9156f269d..5eb4ee73e7 100644
--- a/usr/src/ucbcmd/Makefile.ucbcmd
+++ b/usr/src/ucbcmd/Makefile.ucbcmd
@@ -23,6 +23,7 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright (c) 2018, Joyent, Inc.
#
# ucbcmd/Makefile.ucbcmd
#
@@ -58,6 +59,9 @@ ROOTPROG32= $(PROG:%=$(ROOTBIN32)/%)
ISAEXEC= $(ROOT)/usr/lib/isaexec
+# don't lint any of ucbcmd
+SMATCH=off
+
# storing LDLIBS in two macros allows reordering of options
LDLIBS.cmd = $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3)
LDLIBS = $(LDLIBS.cmd)
diff --git a/usr/src/ucblib/libcurses/Makefile.com b/usr/src/ucblib/libcurses/Makefile.com
index 4c1d763415..3e018e1cfa 100644
--- a/usr/src/ucblib/libcurses/Makefile.com
+++ b/usr/src/ucblib/libcurses/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.
LIBRARY= libcurses.a
VERS= .1
@@ -89,6 +90,9 @@ CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-unused-variable
CERRWARN += -_gcc=-Wno-uninitialized
+# not linted
+SMATCH=off
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/ucblib/libdbm/dbm.c b/usr/src/ucblib/libdbm/dbm.c
index f006db5ea9..e9afce9d15 100644
--- a/usr/src/ucblib/libdbm/dbm.c
+++ b/usr/src/ucblib/libdbm/dbm.c
@@ -31,6 +31,10 @@
* under license from the Regents of the University of California.
*/
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
/*LINTLIBRARY*/
#include <sys/types.h>
@@ -524,12 +528,12 @@ delitem(char buf[PBLKSIZ], int n)
i2 = sp[n+1-1];
i3 = sp[sp[0]+1-1];
if (i2 > i1)
- while (i1 > i3) {
- i1--;
- i2--;
- buf[i2] = buf[i1];
- buf[i1] = 0;
- }
+ while (i1 > i3) {
+ i1--;
+ i2--;
+ buf[i2] = buf[i1];
+ buf[i1] = 0;
+ }
i2 -= i1;
for (i1 = n+1; i1 < sp[0]; i1++)
sp[i1+1-1] = sp[i1+1] + i2;
diff --git a/usr/src/ucblib/librpcsoc/Makefile.com b/usr/src/ucblib/librpcsoc/Makefile.com
index 5807512ec3..a99827f813 100644
--- a/usr/src/ucblib/librpcsoc/Makefile.com
+++ b/usr/src/ucblib/librpcsoc/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.
LIBRARY= librpcsoc.a
VERS = .1
@@ -51,6 +52,9 @@ CPPFLAGS = -I$(SRC)/ucbhead -I../../../lib/libc/inc $(CPPFLAGS.master)
CERRWARN += -_gcc=-Wno-uninitialized
+# not linted
+SMATCH=off
+
.KEEP_STATE:
lint: lintcheck
diff --git a/usr/src/ucblib/libtermcap/Makefile.com b/usr/src/ucblib/libtermcap/Makefile.com
index 2bc6e3ca2e..b569240946 100644
--- a/usr/src/ucblib/libtermcap/Makefile.com
+++ b/usr/src/ucblib/libtermcap/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.
LIBRARY= libtermcap.a
VERS= .1
@@ -45,6 +46,9 @@ LDLIBS += -lc
DEFS= -DCM_N -DCM_GT -DCM_B -DCM_D
CPPFLAGS = $(DEFS) -I$(SRC)/ucbhead $(CPPFLAGS.master)
+# not linted
+SMATCH=off
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/ucblib/libucb/Makefile.com b/usr/src/ucblib/libucb/Makefile.com
index 70b5ff2703..bb277af674 100644
--- a/usr/src/ucblib/libucb/Makefile.com
+++ b/usr/src/ucblib/libucb/Makefile.com
@@ -21,6 +21,7 @@
#
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
#
+# Copyright (c) 2018, Joyent, Inc.
LIBRARY= libucb.a
VERS= .1
@@ -98,6 +99,9 @@ CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-char-subscripts
CERRWARN += -_gcc=-Wno-uninitialized
+# not linted
+SMATCH=off
+
ASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS)
pics/%.o:= ASFLAGS += $(AS_PICFLAGS)