blob: 19cbadf1842190c9bebd5e5dc149b1d0291c242b [file] [log] [blame]
John Levon1f5207b2018-12-15 15:13:09 +00001#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source. A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
John Levon7ae75772019-07-10 08:36:07 -070011# Copyright 2019 Joyent, Inc.
John Levon1f5207b2018-12-15 15:13:09 +000012#
13
14#
15# smatch/sparse checks we always disable, due to too many false positives (or
16# simply too much legacy).
17#
18
John Levon44bf6192019-08-15 02:34:17 -070019SMATCH_ARGS = --disable=uninitialized,check_check_deref
John Levon1f5207b2018-12-15 15:13:09 +000020
21# VLAs are OK by us
22SMATCH_ARGS += -Wno-vla
23# don't care
24SMATCH_ARGS += -Wno-one-bit-signed-bitfield
25# there are lots of "extern void myfunc() { ... }" around
26SMATCH_ARGS += -Wno-external-function-has-definition
27# we have lots of legacy "void foo();" in headers
28SMATCH_ARGS += -Wno-old-style-definition
29SMATCH_ARGS += -Wno-strict-prototypes
John Levon7ae75772019-07-10 08:36:07 -070030SMATCH_ARGS += --fatal-checks
John Levonefe51d02019-07-24 13:20:02 -070031SMATCH_ARGS += --timeout=0
John Levon1f5207b2018-12-15 15:13:09 +000032
33CERRWARN += $(SMATCH_ARGS:%=-_smatch=%)
34
35CERRWARN += $(SMOFF:%=-_smatch=--disable=%)
36
37SMATCH_ =
38SMATCH_on =
39SMATCH_off = -_smatch=off
40
41CERRWARN += $(SMATCH_$(SMATCH))