--- old/usr/src/Makefile.smatch	Mon Aug 19 09:05:07 2019
+++ new/usr/src/Makefile.smatch	Mon Aug 19 09:05:07 2019
@@ -16,7 +16,7 @@
 # simply too much legacy).
 #
 
-SMATCH_ARGS = --disable=uninitialized,check_check_deref,unreachable
+SMATCH_ARGS = --disable=uninitialized,check_check_deref
 
 # VLAs are OK by us
 SMATCH_ARGS += -Wno-vla
--- old/usr/src/cmd/ctfmerge/ctfmerge.c	Mon Aug 19 09:05:07 2019
+++ new/usr/src/cmd/ctfmerge/ctfmerge.c	Mon Aug 19 09:05:07 2019
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright (c) 2019, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -47,7 +47,7 @@
 #define	CTFMERGE_DEFAULT_NTHREADS	8
 #define	CTFMERGE_ALTEXEC	"CTFMERGE_ALTEXEC"
 
-static void
+static void __attribute__((__noreturn__))
 ctfmerge_fatal(const char *fmt, ...)
 {
 	va_list ap;
--- old/usr/src/cmd/cxgbetool/cxgbetool.c	Mon Aug 19 09:05:08 2019
+++ new/usr/src/cmd/cxgbetool/cxgbetool.c	Mon Aug 19 09:05:08 2019
@@ -13,6 +13,10 @@
  * Copyright (c) 2018 by Chelsio Communications, Inc.
  */
 
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -85,7 +89,7 @@
 	exit(fp == stderr ? 1 : 0);
 }
 
-static void
+__NORETURN static void
 err(int code, const char *fmt, ...)
 {
 	va_list ap;
--- old/usr/src/cmd/fm/modules/common/ext-event-transport/fmevt_outbound.c	Mon Aug 19 09:05:08 2019
+++ new/usr/src/cmd/fm/modules/common/ext-event-transport/fmevt_outbound.c	Mon Aug 19 09:05:08 2019
@@ -23,6 +23,10 @@
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
 #include <sys/types.h>
 #include <strings.h>
 #include <fm/fmd_api.h>
@@ -112,7 +116,6 @@
 	    EVCH_CREAT | EVCH_HOLD_PEND_INDEF) != 0) {
 		fmd_hdl_abort(hdl, "Unable to bind channel %s",
 		    channel_name);
-		return;
 	}
 
 	channel_depth = fmd_prop_get_int32(hdl, "outbound_channel_depth");
--- old/usr/src/cmd/fs.d/reparsed/reparsed.c	Mon Aug 19 09:05:08 2019
+++ new/usr/src/cmd/fs.d/reparsed/reparsed.c	Mon Aug 19 09:05:08 2019
@@ -24,7 +24,7 @@
  */
 
 /*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -187,7 +187,7 @@
 	return (start_reparsed_svcs());
 }
 
-static void
+__NORETURN static void
 reparsed_door_call_error(int error, int buflen)
 {
 	reparsed_door_res_t rpd_res;
@@ -354,10 +354,6 @@
 	/*
 	 * Wait for incoming calls
 	 */
-	/*CONSTCOND*/
 	while (1)
 		(void) pause();
-
-	syslog(LOG_ERR, "Door server exited");
-	return (10);
 }
--- old/usr/src/cmd/mdb/common/mdb/mdb_main.c	Mon Aug 19 09:05:09 2019
+++ new/usr/src/cmd/mdb/common/mdb/mdb_main.c	Mon Aug 19 09:05:09 2019
@@ -25,7 +25,7 @@
  */
 
 /*
- * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
+ * Copyright 2019 Joyent, Inc.
  */
 
 #include <sys/types.h>
@@ -1098,7 +1098,6 @@
 	terminate((status == MDB_ERR_QUIT || status == 0) ?
 	    (eflag != NULL && mdb.m_lastret != 0 ? 1 : 0) : 1);
 	/*NOTREACHED*/
-	return (0);
 
 reexec:
 	if ((p = strrchr(execname, '/')) == NULL)
--- old/usr/src/cmd/od/od.c	Mon Aug 19 09:05:09 2019
+++ new/usr/src/cmd/od/od.c	Mon Aug 19 09:05:09 2019
@@ -14,6 +14,10 @@
  */
 
 /*
+ * Copyright 2019 Joyent, Inc.
+ */
+
+/*
  * od - octal dump.  Not really just octal anymore; read the POSIX
  * specification for it -- its more complex than you think!
  *
@@ -533,7 +537,6 @@
 		default:
 			errx(1, _("unrecognized type string character: %c"),
 			    *typestr);
-			exit(1);
 		}
 	}
 }
--- old/usr/src/cmd/sgs/libld/common/map_core.c	Mon Aug 19 09:05:10 2019
+++ new/usr/src/cmd/sgs/libld/common/map_core.c	Mon Aug 19 09:05:10 2019
@@ -24,6 +24,8 @@
  *	  All Rights Reserved
  *
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -2073,10 +2075,6 @@
 			return (tok);
 		}
 	}
-
-	/*NOTREACHED*/
-	assert(0);
-	return (TK_ERROR);
 }
 
 /*
--- old/usr/src/cmd/sgs/libld/common/map_support.c	Mon Aug 19 09:05:10 2019
+++ new/usr/src/cmd/sgs/libld/common/map_support.c	Mon Aug 19 09:05:10 2019
@@ -28,7 +28,7 @@
  */
 
 /*
- * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -84,8 +84,6 @@
 	}
 
 	/*NOTREACHED*/
-	assert(0);
-	return (NULL);
 }
 #endif
 
@@ -199,7 +197,7 @@
 	 * override flag.
 	 */
 	static ofl_flag_t override_flag[CA_SUNW_NUM] = {
-		0, 			/* CA_SUNW_NULL */
+		0,			/* CA_SUNW_NULL */
 		FLG_OF1_OVHWCAP1,	/* CA_SUNW_HW_1 */
 		FLG_OF1_OVSFCAP1,	/* CA_SUNW_SF_1 */
 		FLG_OF1_OVHWCAP2,	/* CA_SUNW_HW_2 */
--- old/usr/src/cmd/sgs/libld/common/map_v2.c	Mon Aug 19 09:05:11 2019
+++ new/usr/src/cmd/sgs/libld/common/map_v2.c	Mon Aug 19 09:05:11 2019
@@ -25,6 +25,10 @@
  */
 
 /*
+ * Copyright 2019 Joyent, Inc.
+ */
+
+/*
  * Map file parsing, Version 2 syntax (solaris).
  */
 #include	<stdio.h>
@@ -3318,8 +3322,4 @@
 			return (FALSE);
 		}
 	}
-
-	/*NOTREACHED*/
-	assert(0);
-	return (FALSE);
 }
--- old/usr/src/cmd/svc/configd/client.c	Mon Aug 19 09:05:11 2019
+++ new/usr/src/cmd/svc/configd/client.c	Mon Aug 19 09:05:11 2019
@@ -22,6 +22,7 @@
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2015 RackTop Systems.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -1988,7 +1989,6 @@
 		case EFAULT:
 		default:
 			bad_error("door_ucred", errno);
-			return;
 		}
 	}
 	if (adt_start_session(&session, NULL, 0) != 0) {
--- old/usr/src/cmd/svc/startd/graph.c	Mon Aug 19 09:05:12 2019
+++ new/usr/src/cmd/svc/startd/graph.c	Mon Aug 19 09:05:12 2019
@@ -21,7 +21,7 @@
 
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  * Copyright (c) 2015, Syneto S.R.L. All rights reserved.
  * Copyright 2016 Toomas Soome <tsoome@me.com>
  * Copyright 2016 RackTop Systems.
@@ -5817,14 +5817,6 @@
 
 		MUTEX_UNLOCK(&gu->gu_lock);
 	}
-
-	/*
-	 * Unreachable for now -- there's currently no graceful cleanup
-	 * called on exit().
-	 */
-	MUTEX_UNLOCK(&gu->gu_lock);
-	scf_handle_destroy(h);
-	return (NULL);
 }
 
 static void
@@ -6190,15 +6182,6 @@
 		(void) pthread_cond_wait(&gu->gu_freeze_cv,
 		    &gu->gu_freeze_lock);
 	}
-
-	/*
-	 * Unreachable for now -- there's currently no graceful cleanup
-	 * called on exit().
-	 */
-	(void) pthread_mutex_unlock(&gu->gu_freeze_lock);
-	scf_handle_destroy(h);
-
-	return (NULL);
 }
 
 
--- old/usr/src/cmd/svc/startd/restarter.c	Mon Aug 19 09:05:13 2019
+++ new/usr/src/cmd/svc/startd/restarter.c	Mon Aug 19 09:05:13 2019
@@ -21,7 +21,7 @@
 
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -2090,14 +2090,6 @@
 			MUTEX_LOCK(&ru->restarter_update_lock);
 		}
 	}
-
-	/*
-	 * Unreachable for now -- there's currently no graceful cleanup
-	 * called on exit().
-	 */
-	(void) scf_handle_unbind(h);
-	scf_handle_destroy(h);
-	return (NULL);
 }
 
 static restarter_inst_t *
--- old/usr/src/cmd/svc/svcprop/svcprop.c	Mon Aug 19 09:05:13 2019
+++ new/usr/src/cmd/svc/svcprop/svcprop.c	Mon Aug 19 09:05:13 2019
@@ -25,7 +25,7 @@
  */
 
 /*
- * Copyright (c) 2011, Joyent, Inc. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -630,8 +630,6 @@
 			    "has too many components for property "
 			    "group `%s'.\n"), spn->spn_comp1, spn->spn_comp2,
 			    buf);
-
-			free(buf);
 		}
 
 		if (scf_pg_get_property(pg, spn->spn_comp1, prop) == 0) {
--- old/usr/src/cmd/ul/Makefile	Mon Aug 19 09:05:14 2019
+++ new/usr/src/cmd/ul/Makefile	Mon Aug 19 09:05:14 2019
@@ -20,10 +20,10 @@
 # CDDL HEADER END
 #
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
 # Copyright (c) 1989 by Sun Microsystems, Inc.
 #
+# Copyright 2019 Joyent, Inc.
+#
 
 PROG= ul
 
@@ -31,14 +31,15 @@
 
 LDLIBS += -lcurses
 
+# false positive
+SMOFF += unreachable
+
 .KEEP_STATE:
 
-all: $(PROG) 
+all: $(PROG)
 
 install: all $(ROOTPROG)
 
 clean:
 
-lint:	lint_PROG
-
 include ../Makefile.targ
--- old/usr/src/cmd/zonecfg/Makefile	Mon Aug 19 09:05:14 2019
+++ new/usr/src/cmd/zonecfg/Makefile	Mon Aug 19 09:05:14 2019
@@ -22,7 +22,8 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
+#
 
 PROG=	zonecfg
 OBJS=	zonecfg.o zonecfg_lex.o zonecfg_grammar.tab.o
@@ -49,6 +50,9 @@
 
 SMOFF += all_func_returns
 
+# false positive
+zonecfg_lex.o := SMOFF += free
+
 CLOBBERFILES += $(PROG).ln
 
 .KEEP_STATE:
--- old/usr/src/lib/brand/shared/brand/Makefile.com	Mon Aug 19 09:05:14 2019
+++ new/usr/src/lib/brand/shared/brand/Makefile.com	Mon Aug 19 09:05:14 2019
@@ -23,7 +23,7 @@
 #
 # Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
 #
-# Copyright (c) 2019, Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
 #
 
 COBJS =		brand_util.o
@@ -55,6 +55,9 @@
 CFLAGS +=	$(CCVERBOSE)
 ASFLAGS =	-P $(ASFLAGS_$(CURTYPE)) -D_ASM -I. -I../sys
 
+# intentional code after abort()
+SMOFF += unreachable
+
 .KEEP_STATE:
 
 #
@@ -67,8 +70,6 @@
 #
 all: pics .WAIT $$(PICS)
 
-lint: lintcheck
-
 $(OBJECTS:%=pics/%): $(OFFSETS_H)
 
 $(OFFSETS_H): $(OFFSETS_SRC)
--- old/usr/src/lib/crt/Makefile.com	Mon Aug 19 09:05:15 2019
+++ new/usr/src/lib/crt/Makefile.com	Mon Aug 19 09:05:15 2019
@@ -22,6 +22,8 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2019 Joyent, Inc.
+#
 
 CRTI = crti.o
 CRTN = crtn.o
@@ -51,10 +53,12 @@
 ASFLAGS +=	-P -D__STDC__ -D_ASM -DPIC $(AS_PICFLAGS)
 
 values-xpg6.o := CPPFLAGS += -I$(SRC)/lib/libc/inc
-values-xpg6.lint := CPPFLAGS += -I$(SRC)/lib/libc/inc
 $(COMMON_CRT) $(VALUES) := CFLAGS += $(C_PICFLAGS)
 $(COMMON_CRT) $(VALUES) := CFLAGS64 += $(C_PICFLAGS64)
 
+# intentional double exit
+SMOFF += unreachable
+
 .KEEP_STATE:
 
 all:	$(OBJECTS)
@@ -62,11 +66,7 @@
 clean clobber:
 	$(RM) $(OBJECTS)
 
-%.lint: ../common/%.c
-	$(LINT.c) $(LINTCHECKFLAGS) $<
 
-lint:	$(VALUES:%.o=%.lint) $(COMMON_CRT:%.o=%.lint)
-
 $(CRT1): $(COMMON_CRT) $(MACH_CRT)
 	$(LD) -r $(MACH_CRT) $(COMMON_CRT) -o $(CRT1)
 
--- old/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c	Mon Aug 19 09:05:15 2019
+++ new/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c	Mon Aug 19 09:05:15 2019
@@ -24,6 +24,10 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
 #include <net-snmp/net-snmp-config.h>
 #include <net-snmp/net-snmp-includes.h>
 #include <net-snmp/agent/net-snmp-agent-includes.h>
@@ -35,7 +39,6 @@
 	(void) snmp_vlog(LOG_ERR, format, ap);
 #ifdef DEBUG
 	abort();
-	exit(1);
 #endif
 }
 
--- old/usr/src/lib/scsi/libscsi/common/scsi_subr.c	Mon Aug 19 09:05:16 2019
+++ new/usr/src/lib/scsi/libscsi/common/scsi_subr.c	Mon Aug 19 09:05:16 2019
@@ -23,6 +23,10 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
 #include <sys/types.h>
 #include <sys/scsi/generic/commands.h>
 #include <sys/scsi/impl/spc3_types.h>
@@ -56,10 +60,7 @@
 	(void) write(STDERR_FILENO, msg, strlen(msg));
 
 	abort();
-	_exit(1);
-
 	/*NOTREACHED*/
-	return (0);
 }
 
 int
--- old/usr/src/lib/scsi/libses/Makefile.defs	Mon Aug 19 09:05:16 2019
+++ new/usr/src/lib/scsi/libses/Makefile.defs	Mon Aug 19 09:05:16 2019
@@ -22,7 +22,8 @@
 #
 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
+#
 
 SRCS = $(OBJECTS:%.o=../common/%.c)
 CSTD = $(CSTD_GNU99)
@@ -32,7 +33,6 @@
 
 CERRWARN += -_gcc=-Wno-type-limits
 CERRWARN += $(CNOWARN_UNINIT)
-CERRWARN += -_gcc=-Wno-unused-label
 
 SMOFF += all_func_returns
 
--- old/usr/src/lib/scsi/libses/common/ses_subr.c	Mon Aug 19 09:05:16 2019
+++ new/usr/src/lib/scsi/libses/common/ses_subr.c	Mon Aug 19 09:05:16 2019
@@ -24,7 +24,9 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
 
 #include <scsi/libses.h>
 #include "ses_impl.h"
@@ -54,9 +56,7 @@
 
 	(void) write(STDERR_FILENO, msg, strlen(msg));
 
-abort:
 	abort();
-	_exit(1);
 }
 
 /*PRINTFLIKE1*/
--- old/usr/src/lib/scsi/libsmp/common/smp_subr.c	Mon Aug 19 09:05:17 2019
+++ new/usr/src/lib/scsi/libsmp/common/smp_subr.c	Mon Aug 19 09:05:17 2019
@@ -23,6 +23,10 @@
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
 #include <sys/types.h>
 
 #include <stddef.h>
@@ -61,10 +65,7 @@
 	(void) write(STDERR_FILENO, msg, strlen(msg));
 
 	abort();
-	_exit(1);
-
 	/*NOTREACHED*/
-	return (0);
 }
 
 int
--- old/usr/src/test/libc-tests/tests/Makefile	Mon Aug 19 09:05:17 2019
+++ new/usr/src/test/libc-tests/tests/Makefile	Mon Aug 19 09:05:17 2019
@@ -12,7 +12,7 @@
 #
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright 2015 Garrett D'Amore <garrett@damore.org>
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
 #
 
 SUBDIRS = \
@@ -58,7 +58,7 @@
 CPPFLAGS += -D_REENTRANT
 
 # needs work
-SMOFF += all_func_returns,snprintf_overflow
+SMOFF += all_func_returns,snprintf_overflow,unreachable
 
 PROGS32 = $(PROGS:%=%.32)
 PROGS64 = \
--- old/usr/src/test/libc-tests/tests/c11_threads.c	Mon Aug 19 09:05:17 2019
+++ new/usr/src/test/libc-tests/tests/c11_threads.c	Mon Aug 19 09:05:17 2019
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright 2017 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -172,7 +172,6 @@
 cthr_test_detach_thr0(void *arg)
 {
 	thrd_exit(23);
-	abort();
 }
 
 static int
--- old/usr/src/test/os-tests/tests/file-locking/runtests.c	Mon Aug 19 09:05:18 2019
+++ new/usr/src/test/os-tests/tests/file-locking/runtests.c	Mon Aug 19 09:05:18 2019
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -327,7 +327,6 @@
 		return (1);
 	} else {
 		abort();
-		return (1);
 	}
 }
 
--- old/usr/src/test/os-tests/tests/file-locking/util.c	Mon Aug 19 09:05:18 2019
+++ new/usr/src/test/os-tests/tests/file-locking/util.c	Mon Aug 19 09:05:18 2019
@@ -10,7 +10,7 @@
  */
 
 /*
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -101,7 +101,6 @@
 		return (LSTYLE_FLOCK);
 	} else {
 		errx(EXIT_FAILURE, BAD_LOCK_MESSAGE);
-		return (LSTYLE_LAST);
 	}
 }
 
@@ -118,7 +117,6 @@
 		return ("flock");
 	default:
 		abort();
-		return ("<unreachable>");
 	}
 }
 
@@ -135,7 +133,6 @@
 		return ("flock(3C)");
 	default:
 		abort();
-		return ("<unreachable>");
 	}
 }
 
@@ -178,6 +175,5 @@
 #endif
 	default:
 		abort();
-		return ("<unreachable>");
 	}
 }
--- old/usr/src/test/os-tests/tests/sockfs/conn.c	Mon Aug 19 09:05:18 2019
+++ new/usr/src/test/os-tests/tests/sockfs/conn.c	Mon Aug 19 09:05:18 2019
@@ -20,6 +20,10 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -114,8 +118,6 @@
 			exit(1);
 		}
 	}
-
-	exit(0);
 }
 
 /*
--- old/usr/src/test/util-tests/tests/libnvpair_json/Makefile	Mon Aug 19 09:05:19 2019
+++ new/usr/src/test/util-tests/tests/libnvpair_json/Makefile	Mon Aug 19 09:05:19 2019
@@ -10,7 +10,7 @@
 #
 
 #
-# Copyright (c) 2014 Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
 #
 
 include $(SRC)/Makefile.master
@@ -43,7 +43,8 @@
 
 LDLIBS += -lnvpair
 
-LINTFLAGS += -erroff=E_FUNC_ARG_UNUSED
+# intentional abort()
+SMOFF += unreachable
 
 all: $(PROG)
 
--- old/usr/src/tools/smatch/Makefile	Mon Aug 19 09:05:19 2019
+++ new/usr/src/tools/smatch/Makefile	Mon Aug 19 09:05:19 2019
@@ -13,7 +13,7 @@
 
 #
 # The src/ sub-directory is un-modified copy of
-# https://github.com/illumos/smatch/tree/0.5.1-il-4
+# https://github.com/illumos/smatch/tree/0.5.1-il-5
 #
 # This Makefile installs just enough for us to be able to run smatch
 # locally.
@@ -20,7 +20,7 @@
 #
 
 PROG = smatch
-SPARSE_VERSION = 0.5.1-il-4
+SPARSE_VERSION = 0.5.1-il-5
 
 include ../Makefile.tools
 
@@ -92,9 +92,7 @@
 	macro_table.o token_store.o hashtable.o
 
 SMATCH_DATA = \
-	illumos_kernel.no_return_funcs \
 	illumos_kernel.skipped_functions \
-	illumos_user.no_return_funcs \
 	illumos_user.skipped_functions
 
 SMATCH_DB_DATA = \
--- old/usr/src/tools/smatch/src/Makefile	Mon Aug 19 09:05:19 2019
+++ new/usr/src/tools/smatch/src/Makefile	Mon Aug 19 09:05:19 2019
@@ -1,4 +1,4 @@
-VERSION=0.5.1-il-4
+VERSION=0.5.1-il-5
 
 # Generating file version.h if current version has changed
 SPARSE_VERSION:=$(shell git describe 2>/dev/null || echo '$(VERSION)')
--- old/usr/src/tools/smatch/src/check_unreachable.c	Mon Aug 19 09:05:20 2019
+++ new/usr/src/tools/smatch/src/check_unreachable.c	Mon Aug 19 09:05:20 2019
@@ -172,7 +172,7 @@
 	default:
 		break;
 	}
-	sm_msg("info: ignoring unreachable code.");
+	sm_warning("ignoring unreachable code.");
 	print_unreached = 0;
 }
 
--- old/usr/src/tools/smatch/src/parse.c	Mon Aug 19 09:05:20 2019
+++ new/usr/src/tools/smatch/src/parse.c	Mon Aug 19 09:05:20 2019
@@ -2859,6 +2859,7 @@
 	/* Parse declaration-specifiers, if any */
 	token = declaration_specifiers(token, &ctx);
 	mod = storage_modifiers(&ctx);
+	mod |= ctx.ctype.modifiers & MOD_NORETURN;
 	decl = alloc_symbol(token->pos, SYM_NODE);
 	/* Just a type declaration? */
 	if (match_op(token, ';')) {
--- old/usr/src/tools/smatch/src/smatch_data/illumos_kernel.no_return_funcs	Mon Aug 19 09:05:21 2019
+++ /dev/null	Mon Aug 19 09:05:21 2019
@@ -1,18 +0,0 @@
-/*
- * These functions don't return.  Unfortunately, sparse today doesn't correctly
- * respect __NORETURN, so we have to explicitly list them here for now.
- */
-__assert_fail
-__builtin_unreachable
-bop_panic
-efi_reset
-panic
-pc_reset
-prom_exit_to_mon
-prom_panic
-prom_reboot
-reset
-resume_from_zombie
-swtch_from_zombie
-thread_exit
-vpanic
--- old/usr/src/tools/smatch/src/smatch_data/illumos_user.no_return_funcs	Mon Aug 19 09:05:21 2019
+++ /dev/null	Mon Aug 19 09:05:21 2019
@@ -1,21 +0,0 @@
-/*
- * These functions don't return.  Unfortunately, sparse today doesn't correctly
- * respect __NORETURN, so we have to explicitly list them here for now.
- */
-__assert_fail
-__builtin_unreachable
-abort
-ctfmerge_fatal
-err
-errx
-_exit
-exit
-_longjmp
-longjmp
-pthread_exit
-reparsed_door_call_error
-siglongjmp
-terminate
-thr_exit
-verr
-verrx
--- old/usr/src/ucblib/libdbm/dbm.c	Mon Aug 19 09:05:21 2019
+++ new/usr/src/ucblib/libdbm/dbm.c	Mon Aug 19 09:05:21 2019
@@ -24,7 +24,7 @@
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
-/*	  All Rights Reserved  	*/
+/*	  All Rights Reserved 	*/
 
 /*
  * Portions of this source code were derived from Berkeley 4.3 BSD
@@ -32,7 +32,7 @@
  */
 
 /*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*LINTLIBRARY*/
@@ -241,7 +241,7 @@
 				Sentry.dsize = key.dsize;
 				Sentry.dptr = malloc(strlen(key.dptr)+1);
 				(void) strncpy(Sentry.dptr, key.dptr,
-					key.dsize);
+				    key.dsize);
 			}
 			break;
 		}
@@ -442,7 +442,8 @@
 	do
 		if (*p1++ != *p2++)
 			return (*--p1 - *--p2);
-	while (--n);
+	while (--n)
+		;
 	return (0);
 }
 
@@ -589,5 +590,4 @@
 bad:
 	(void) printf("bad block\n");
 	abort();
-	bzero(buf, PBLKSIZ);
 }
--- old/usr/src/uts/common/contract/device.c	Mon Aug 19 09:05:21 2019
+++ new/usr/src/uts/common/contract/device.c	Mon Aug 19 09:05:21 2019
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
  */
 
 #include <sys/mutex.h>
@@ -2053,7 +2054,6 @@
 		cmn_err(CE_PANIC, "contract_device_negotiate(): Negotiation "
 		    "not supported: event (%d) for dev_t (%lu) and spec (%d), "
 		    "dip (%p)", evtype, dev, spec_type, (void *)dip);
-		result = CT_NACK;
 		break;
 	}
 
--- old/usr/src/uts/common/fs/zfs/vdev_queue.c	Mon Aug 19 09:05:22 2019
+++ new/usr/src/uts/common/fs/zfs/vdev_queue.c	Mon Aug 19 09:05:22 2019
@@ -26,6 +26,7 @@
 /*
  * Copyright (c) 2012, 2018 by Delphix. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2019 Joyent, Inc.
  */
 
 #include <sys/zfs_context.h>
@@ -405,7 +406,6 @@
 		return (zfs_vdev_initializing_min_active);
 	default:
 		panic("invalid priority %u", p);
-		return (0);
 	}
 }
 
@@ -468,7 +468,6 @@
 		return (zfs_vdev_initializing_max_active);
 	default:
 		panic("invalid priority %u", p);
-		return (0);
 	}
 }
 
--- old/usr/src/uts/common/inet/ip/ip.c	Mon Aug 19 09:05:22 2019
+++ new/usr/src/uts/common/inet/ip/ip.c	Mon Aug 19 09:05:22 2019
@@ -9103,7 +9103,6 @@
 				 */
 				cmn_err(CE_PANIC, "ip_forward_options: "
 				    "unknown IT - bug in ip_input_options?\n");
-				return (B_TRUE);	/* Keep "lint" happy */
 			}
 			if (opt[IPOPT_OFFSET] - 1 + off > optlen) {
 				/* Increase overflow counter */
@@ -9330,7 +9329,6 @@
 				 */
 				cmn_err(CE_PANIC, "ip_input_local_options: "
 				    "unknown IT - bug in ip_input_options?\n");
-				return (B_TRUE);	/* Keep "lint" happy */
 			}
 			if (opt[IPOPT_OFFSET] - 1 + off > optlen) {
 				/* Increase overflow counter */
@@ -12018,7 +12016,6 @@
 				 */
 				cmn_err(CE_PANIC, "ip_output_local_options: "
 				    "unknown IT - bug in ip_output_options?\n");
-				return;	/* Keep "lint" happy */
 			}
 			if (opt[IPOPT_OFFSET] - 1 + off > optlen) {
 				/* Increase overflow counter */
--- old/usr/src/uts/common/io/1394/s1394_dev_disc.c	Mon Aug 19 09:05:23 2019
+++ new/usr/src/uts/common/io/1394/s1394_dev_disc.c	Mon Aug 19 09:05:23 2019
@@ -24,7 +24,9 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
 
 /*
  * s1394_dev_disc.c
@@ -89,7 +91,7 @@
 #define	SETUP_QUAD_READ(n, reset_fails, quadlet, cnt)			\
 {									\
 	int i = (reset_fails);						\
-	if (i != 0) { 							\
+	if (i != 0) {							\
 		(n)->cfgrom_read_fails = 0;				\
 		(n)->cfgrom_read_delay = (uchar_t)s1394_cfgrom_read_delay_ms; \
 	}								\
@@ -489,7 +491,6 @@
 	hal->br_thread_ev_type &= ~BR_THR_GO_AWAY;
 	thread_exit();
 	/*NOTREACHED*/
-	TNF_PROBE_0(s1394_br_thread_exit_enter, S1394_TNF_SL_HOTPLUG_STACK, "");
 }
 
 /*
--- old/usr/src/uts/common/io/consconfig_dacf.c	Mon Aug 19 09:05:24 2019
+++ new/usr/src/uts/common/io/consconfig_dacf.c	Mon Aug 19 09:05:24 2019
@@ -930,7 +930,6 @@
 	    &wc_lh, sp->cons_li)) {
 		cmn_err(CE_PANIC, "cons_build_upper_layer: "
 		    "unable to open wc device");
-		return;
 	}
 	ASSERT(wc_dev == sp->cons_wc_vp->v_rdev);
 
--- old/usr/src/uts/common/io/i40e/i40e_main.c	Mon Aug 19 09:05:24 2019
+++ new/usr/src/uts/common/io/i40e/i40e_main.c	Mon Aug 19 09:05:24 2019
@@ -1684,7 +1684,6 @@
 	default:
 		panic("bad interrupt type passed to i40e_alloc_intr_handles: "
 		    "%d", intr_type);
-		return (B_FALSE);
 	}
 
 	rc = ddi_intr_get_nintrs(devinfo, intr_type, &count);
--- old/usr/src/uts/common/io/ntxn/unm_nic_hw.c	Mon Aug 19 09:05:25 2019
+++ new/usr/src/uts/common/io/ntxn/unm_nic_hw.c	Mon Aug 19 09:05:25 2019
@@ -25,7 +25,7 @@
  */
 
 /*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 #include <sys/types.h>
@@ -704,7 +704,6 @@
 	if (rv == -1) {
 		cmn_err(CE_PANIC, "%s: invalid offset: 0x%016llx\n",
 		    __FUNCTION__, off);
-		return (-1);
 	}
 
 	if (rv == 1) {
@@ -813,7 +812,6 @@
 	if (rv == -1) {
 		cmn_err(CE_PANIC, "%s: invalid offset: 0x%016llx\n",
 		    __FUNCTION__, off);
-		return (-1);
 	}
 
 	if (rv == 1) {
@@ -953,7 +951,6 @@
 		/* DDR network side */
 		/* MN access should never come here */
 		cmn_err(CE_PANIC, "%s\n", __FUNCTION__);
-		addr = -1ULL;
 	} else if (ADDR_IN_RANGE(addr, UNM_ADDR_OCM0, UNM_ADDR_OCM0_MAX)) {
 		addr -= UNM_ADDR_OCM0;
 		addr += UNM_PCI_OCM0;
--- old/usr/src/uts/common/io/usbgem/usbgem.c	Mon Aug 19 09:05:25 2019
+++ new/usr/src/uts/common/io/usbgem/usbgem.c	Mon Aug 19 09:05:25 2019
@@ -32,6 +32,10 @@
  */
 
 /*
+ * Copyright 2019 Joyent, Inc.
+ */
+
+/*
  * Change log
  */
 
@@ -2051,7 +2055,6 @@
 	default:
 		cmn_err(CE_PANIC, "!%s: unknowm linkdown action: %d",
 		    dp->name, dp->ugc.usbgc_mii_linkdown_action);
-		dp->mii_supress_msg = B_TRUE;
 	}
 	/* NOTREACHED */
 
--- old/usr/src/uts/common/os/driver_lyr.c	Mon Aug 19 09:05:26 2019
+++ new/usr/src/uts/common/os/driver_lyr.c	Mon Aug 19 09:05:26 2019
@@ -22,7 +22,7 @@
  * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 /*
- * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
@@ -1924,7 +1924,7 @@
 
 int
 ldi_ioctl(ldi_handle_t lh, int cmd, intptr_t arg, int mode,
-	cred_t *cr, int *rvalp)
+    cred_t *cr, int *rvalp)
 {
 	struct ldi_handle	*handlep = (struct ldi_handle *)lh;
 	vnode_t			*vp;
@@ -1999,7 +1999,7 @@
 
 int
 ldi_prop_op(ldi_handle_t lh, ddi_prop_op_t prop_op,
-	int flags, char *name, caddr_t valuep, int *length)
+    int flags, char *name, caddr_t valuep, int *length)
 {
 	struct ldi_handle	*handlep = (struct ldi_handle *)lh;
 	dev_t			dev;
@@ -3493,7 +3493,6 @@
 	if (!ldi_ev_sync_event(evname)) {
 		cmn_err(CE_PANIC, "ldi_ev_notify(): %s not a "
 		    "negotiatable event", evname);
-		return (LDI_EV_SUCCESS);
 	}
 
 	major = ddi_driver_major(dip);
--- old/usr/src/uts/common/vm/seg_dev.c	Mon Aug 19 09:05:27 2019
+++ new/usr/src/uts/common/vm/seg_dev.c	Mon Aug 19 09:05:27 2019
@@ -22,7 +22,7 @@
 /*
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
@@ -3988,7 +3988,6 @@
 			mutex_exit(&cp->lock);
 			panic("ddi_umem_free for cookie with pending faults %p",
 			    (void *)cp);
-			return;
 		}
 
 		segkp_release(segkp, cp->cvaddr);
--- old/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c	Mon Aug 19 09:05:27 2019
+++ new/usr/src/uts/i86pc/io/amd_iommu/amd_iommu_impl.c	Mon Aug 19 09:05:27 2019
@@ -22,6 +22,7 @@
 /*
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
+ * Copyright 2019 Joyent, Inc.
  */
 
 #include <sys/sunddi.h>
@@ -1392,16 +1393,14 @@
 		}
 	}
 
-	cmn_err(
 #ifdef	DEBUG
-	    CE_PANIC,
+	cmn_err(CE_PANIC, "%s: %s%d dip = %p has no PCI parent, path = %s",
+	    f, driver, instance, (void *)rdip, path);
 #else
-	    CE_WARN,
-#endif	/* DEBUG */
-	    "%s: %s%d dip = %p has no PCI parent, path = %s",
+	cmn_err(CE_WARN, "%s: %s%d dip = %p has no PCI parent, path = %s",
 	    f, driver, instance, (void *)rdip, path);
-
 	ndi_rele_devi(rdip);
+#endif	/* DEBUG */
 
 	return (NULL);
 }
--- old/usr/src/uts/i86pc/os/mp_startup.c	Mon Aug 19 09:05:28 2019
+++ new/usr/src/uts/i86pc/os/mp_startup.c	Mon Aug 19 09:05:28 2019
@@ -1923,7 +1923,6 @@
 	 * Now we are done with the startup thread, so free it up.
 	 */
 	thread_exit();
-	panic("mp_startup: cannot return");
 	/*NOTREACHED*/
 }
 
