--- old/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c	Mon Jan  7 12:59:01 2019
+++ new/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c	Mon Jan  7 12:59:01 2019
@@ -76,8 +76,10 @@
 		return (NULL);
 
 	while ((fd = open(CRYPTO_DEVICE, O_RDWR)) < 0) {
-		if (errno != EINTR)
+		if (errno != EINTR) {
+			free(op);
 			return (NULL);
+		}
 	}
 
 	op->in = (char *)arg->in;
--- old/usr/src/test/libc-tests/tests/Makefile	Mon Jan  7 12:59:02 2019
+++ new/usr/src/test/libc-tests/tests/Makefile	Mon Jan  7 12:59:02 2019
@@ -12,7 +12,7 @@
 #
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright 2015 Garrett D'Amore <garrett@damore.org>
-# Copyright 2016 Joyent, Inc.
+# Copyright (c) 2018, Joyent, Inc.
 #
 
 SUBDIRS = \
@@ -56,6 +56,9 @@
 
 CPPFLAGS += -D_REENTRANT
 
+# needs work
+SMOFF += all_func_returns,snprintf_overflow
+
 PROGS32 = $(PROGS:%=%.32)
 PROGS64 = \
 	$(PROGS:%=%.64) \
--- old/usr/src/test/libc-tests/tests/regex/Makefile	Mon Jan  7 12:59:03 2019
+++ new/usr/src/test/libc-tests/tests/regex/Makefile	Mon Jan  7 12:59:03 2019
@@ -37,6 +37,9 @@
 CERRWARN +=	-_gcc=-Wno-uninitialized
 CERRWARN +=	-_gcc=-Wno-clobbered
 
+# needs work
+SMOFF += all_func_returns,testing_index_after_use
+
 CMDS=		$(PROG:%=$(TESTDIR)/%) $(SHPROG:%=$(TESTDIR)/%)
 $(CMDS):=	FILEMODE=0555
 TESTDATA=	$(DATA:%=$(DATADIR)/%)
--- old/usr/src/test/libc-tests/tests/select/Makefile	Mon Jan  7 12:59:03 2019
+++ new/usr/src/test/libc-tests/tests/select/Makefile	Mon Jan  7 12:59:03 2019
@@ -10,6 +10,7 @@
 #
 
 # Copyright 2016, Richard Lowe.
+# Copyright (c) 2018, Joyent, Inc.
 
 include $(SRC)/Makefile.master
 include $(SRC)/Makefile.master.64
@@ -24,6 +25,9 @@
 
 CSTD= $(CSTD_GNU99)
 
+# needs work
+SMOFF += all_func_returns
+
 select_test: select_test.c
 	$(LINK64.c) -o $@ select_test.c $(LDLIBS64)
 	$(POST_PROCESS)
--- old/usr/src/test/libc-tests/tests/symbols/Makefile	Mon Jan  7 12:59:04 2019
+++ new/usr/src/test/libc-tests/tests/symbols/Makefile	Mon Jan  7 12:59:04 2019
@@ -50,6 +50,9 @@
 
 include ../Makefile.com
 
+# needs work
+SMOFF += testing_index_after_use
+
 LDLIBS += -lcustr
 LDLIBS64 += -lcustr
 
--- old/usr/src/test/os-tests/tests/i386/badseg.c	Mon Jan  7 12:59:06 2019
+++ new/usr/src/test/os-tests/tests/i386/badseg.c	Mon Jan  7 12:59:06 2019
@@ -68,7 +68,7 @@
 	if (rc == 0) {
 		done = 1;
 		ucp.uc_mcontext.gregs[seg] = selector;
-		setcontext(&ucp);
+		(void) setcontext(&ucp);
 	}
 	abort();
 }
--- old/usr/src/test/os-tests/tests/i386/ldt.c	Mon Jan  7 12:59:08 2019
+++ new/usr/src/test/os-tests/tests/i386/ldt.c	Mon Jan  7 12:59:08 2019
@@ -28,7 +28,7 @@
 static void *
 donothing(void *nothing)
 {
-	sleep(5);
+	(void) sleep(5);
 	return (NULL);
 }
 
@@ -68,13 +68,13 @@
 	}
 
 	for (int i = 0; i < 10; i++)
-		pthread_create(&tid, NULL, donothing, NULL);
+		(void) pthread_create(&tid, NULL, donothing, NULL);
 
 	if (forkall() == 0) {
-		sleep(2);
+		(void) sleep(2);
 		_exit(0);
 	}
 
-	sleep(6);
+	(void) sleep(6);
 	return (0);
 }
--- old/usr/src/test/os-tests/tests/secflags/stacky.c	Mon Jan  7 12:59:09 2019
+++ new/usr/src/test/os-tests/tests/secflags/stacky.c	Mon Jan  7 12:59:09 2019
@@ -3,6 +3,6 @@
 int
 main(int argc, char **argv)
 {
-	sleep(100000);
+	(void) sleep(100000);
 	return (0);
 }
--- old/usr/src/test/os-tests/tests/sockfs/Makefile	Mon Jan  7 12:59:10 2019
+++ new/usr/src/test/os-tests/tests/sockfs/Makefile	Mon Jan  7 12:59:10 2019
@@ -12,6 +12,7 @@
 #
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright 2017 Gordon W. Ross
+# Copyright (c) 2018, Joyent, Inc.
 #
 
 include $(SRC)/cmd/Makefile.cmd
@@ -25,6 +26,9 @@
 CSTD = $(CSTD_GNU99)
 CPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
 
+# needs work
+SMOFF += all_func_returns
+
 nosignal := LDLIBS += -lnsl
 nosignal.ln := LDLIBS += -lnsl
 
--- old/usr/src/test/smbclient-tests/cmd/Makefile.cmd	Mon Jan  7 12:59:10 2019
+++ new/usr/src/test/smbclient-tests/cmd/Makefile.cmd	Mon Jan  7 12:59:10 2019
@@ -11,6 +11,7 @@
 
 #
 # Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
+# Copyright (c) 2018, Joyent, Inc.
 #
 
 include		$(SRC)/test/Makefile.com
@@ -27,6 +28,9 @@
 LINTFLAGS +=	-erroff=E_NAME_DECL_NOT_USED_DEF2
 LINTFLAGS +=	-erroff=E_FUNC_RET_ALWAYS_IGNOR2
 
+# needs work
+SMOFF += all_func_returns,leaks
+
 all:		$(PROG)
 
 $(PROG):	$(OBJS)
--- old/usr/src/test/smbclient-tests/cmd/mkfile_mmap/mkfile_mmap.c	Mon Jan  7 12:59:11 2019
+++ new/usr/src/test/smbclient-tests/cmd/mkfile_mmap/mkfile_mmap.c	Mon Jan  7 12:59:11 2019
@@ -12,6 +12,7 @@
 /*
  * Copyright 2012 Jilin Xpd <jilinxpd@gmail.com>
  * Copyright 2018 Nexenta Systems, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 /*
@@ -139,21 +140,21 @@
 			break;
 		}
 
-	/* tag each block (to aid debug) */
-	p = file_addr;
-	q = file_addr + blksize - K;
-	memset(p, ' ', K);
-	snprintf(p, K, "\nblk=%d\n\n", i);
-	p += K;
-
-		/* fill something into mapped addr */
-	while (p < q) {
+		/* tag each block (to aid debug) */
+		p = file_addr;
+		q = file_addr + blksize - K;
 		memset(p, ' ', K);
-		snprintf(p, K, "\noff=0x%x\n\n",
-		    (i * blksize) + (p - file_addr));
+		snprintf(p, K, "\nblk=%d\n\n", i);
 		p += K;
-	}
 
+		/* fill something into mapped addr */
+		while (p < q) {
+			memset(p, ' ', K);
+			snprintf(p, K, "\noff=0x%x\n\n",
+			    (i * blksize) + (p - file_addr));
+			p += K;
+		}
+
 		/* sync mapped pages to file */
 		if (msync(file_addr, blksize, MS_SYNC) == -1) {
 			fprintf(stderr, "msync %s error=%d\n", filename, errno);
--- old/usr/src/test/zfs-tests/cmd/randfree_file/randfree_file.c	Mon Jan  7 12:59:12 2019
+++ new/usr/src/test/zfs-tests/cmd/randfree_file/randfree_file.c	Mon Jan  7 12:59:12 2019
@@ -28,6 +28,10 @@
  * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
 #include "../file_common.h"
 
 /*
@@ -84,10 +88,12 @@
 
 	if ((fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, mode)) < 0) {
 		perror("open");
+		free(buf);
 		return (1);
 	}
 	if (write(fd, buf, filesize) < filesize) {
 		perror("write");
+		free(buf);
 		return (1);
 	}
 	fl.l_whence = SEEK_SET;
@@ -95,6 +101,7 @@
 	fl.l_len = off_len;
 	if (fcntl(fd, F_FREESP, &fl) != 0) {
 		perror("fcntl");
+		free(buf);
 		return (1);
 	}
 
--- old/usr/src/test/zfs-tests/tests/functional/ctime/ctime_001_pos.c	Mon Jan  7 12:59:14 2019
+++ new/usr/src/test/zfs-tests/tests/functional/ctime/ctime_001_pos.c	Mon Jan  7 12:59:14 2019
@@ -28,6 +28,9 @@
  * Copyright (c) 2013 by Delphix. All rights reserved.
  */
 
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -322,7 +325,7 @@
 		 * Sleep 2 seconds, then invoke command on given file
 		 */
 		(void) sleep(2);
-		timetest_table[i].func(tfile);
+		(void) timetest_table[i].func(tfile);
 
 		/*
 		 * Get time after operating.
