Print this page
10077 usr/src/uts/ Makefile changes for smatch

@@ -20,10 +20,11 @@
 #
 #
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright (c) 2018, Joyent, Inc.
 #
 #       This makefile drives the production of the ip driver 
 #       kernel module.
 #
 #       intel implementation architecture dependent

@@ -66,10 +67,23 @@
 CERRWARN        += -_gcc=-Wno-unused-variable
 CERRWARN        += -_gcc=-Wno-switch
 CERRWARN        += -_gcc=-Wno-uninitialized
 CERRWARN        += -_gcc=-Wno-type-limits
 
+# false positives
+SMOFF += index_overflow
+
+# need work still
+$(OBJS_DIR)/igmp.o := SMOFF += shift_to_zero
+$(OBJS_DIR)/tnet.o := SMOFF += shift_to_zero
+SMOFF += signed,all_func_returns
+SMOFF += signed_integer_overflow_check
+
+# definitely wrong
+$(OBJS_DIR)/ip_input.o := SMOFF += or_vs_and
+$(OBJS_DIR)/ip6_input.o := SMOFF += or_vs_and
+
 #
 # To get the BPF header files included by ipnet.h
 #
 INC_PATH        += -I$(UTSBASE)/common/io/bpf