Print this page
10063 basic support for smatch
10153 checkpaths shouldn't check packaging exceptions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/Makefile.uts
          +++ new/usr/src/uts/Makefile.uts
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  
  22   22  #
  23   23  # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24  # Copyright (c) 2011 Bayard G. Bell. All rights reserved.
  25   25  # Copyright (c) 2011 by Delphix. All rights reserved.
  26   26  # Copyright (c) 2013 Andrew Stormont.  All rights reserved.
  27   27  # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
       28 +# Copyright (c) 2018, Joyent, Inc.
  28   29  #
  29   30  
  30   31  #
  31   32  #       This Makefile contains the common targets and definitions for
  32   33  #       all kernels. It is to be included in the Makefiles for specific
  33   34  #       implementation architectures and processor architecture dependent
  34   35  #       modules: i.e.: all driving kernel Makefiles.
  35   36  #
  36   37  #       Include global definitions:
  37   38  #
↓ open down ↓ 181 lines elided ↑ open up ↑
 219  220  CERRWARN += -_gcc=-Wno-sign-compare
 220  221  CERRWARN += -_gcc=-Wno-unknown-pragmas
 221  222  CERRWARN += -_gcc=-Wno-unused-parameter
 222  223  CERRWARN += -_gcc=-Wno-missing-field-initializers
 223  224  
 224  225  # DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
 225  226  # -nd builds
 226  227  $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
 227  228  $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
 228  229  
      230 +CERRWARN += -_smatch=-p=illumos_kernel
      231 +include $(SRC)/Makefile.smatch
      232 +
      233 +#
      234 +# Unfortunately, _IOWR() is regularly used with a third argument of 0,
      235 +# so we have to disable all these smatch checks.
      236 +#
      237 +SMOFF += sizeof
      238 +
 229  239  CSTD = $(CSTD_GNU99)
 230  240  
 231  241  CFLAGS_uts              =
 232  242  CFLAGS_uts              += $(STAND_FLAGS_$(CLASS))
 233  243  CFLAGS_uts              += $(CCVERBOSE)
 234  244  CFLAGS_uts              += $(ILDOFF)
 235  245  CFLAGS_uts              += $(XAOPT)
 236  246  CFLAGS_uts              += $(CTF_FLAGS_$(CLASS))
 237  247  CFLAGS_uts              += $(CERRWARN)
 238  248  CFLAGS_uts              += $(CCNOAUTOINLINE)
↓ open down ↓ 397 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX