11 # Copyright 2019 Joyent, Inc.
12 #
13
14 #
15 # smatch/sparse checks we always disable, due to too many false positives (or
16 # simply too much legacy).
17 #
18
19 SMATCH_ARGS = --disable=uninitialized,check_check_deref,unreachable
20
21 # VLAs are OK by us
22 SMATCH_ARGS += -Wno-vla
23 # don't care
24 SMATCH_ARGS += -Wno-one-bit-signed-bitfield
25 # there are lots of "extern void myfunc() { ... }" around
26 SMATCH_ARGS += -Wno-external-function-has-definition
27 # we have lots of legacy "void foo();" in headers
28 SMATCH_ARGS += -Wno-old-style-definition
29 SMATCH_ARGS += -Wno-strict-prototypes
30 SMATCH_ARGS += --fatal-checks
31 SMATCH_ARGS += --timeout=120
32
33 CERRWARN += $(SMATCH_ARGS:%=-_smatch=%)
34
35 CERRWARN += $(SMOFF:%=-_smatch=--disable=%)
36
37 SMATCH_ =
38 SMATCH_on =
39 SMATCH_off = -_smatch=off
40
41 CERRWARN += $(SMATCH_$(SMATCH))
|
11 # Copyright 2019 Joyent, Inc.
12 #
13
14 #
15 # smatch/sparse checks we always disable, due to too many false positives (or
16 # simply too much legacy).
17 #
18
19 SMATCH_ARGS = --disable=uninitialized,check_check_deref,unreachable
20
21 # VLAs are OK by us
22 SMATCH_ARGS += -Wno-vla
23 # don't care
24 SMATCH_ARGS += -Wno-one-bit-signed-bitfield
25 # there are lots of "extern void myfunc() { ... }" around
26 SMATCH_ARGS += -Wno-external-function-has-definition
27 # we have lots of legacy "void foo();" in headers
28 SMATCH_ARGS += -Wno-old-style-definition
29 SMATCH_ARGS += -Wno-strict-prototypes
30 SMATCH_ARGS += --fatal-checks
31 SMATCH_ARGS += --timeout=0
32
33 CERRWARN += $(SMATCH_ARGS:%=-_smatch=%)
34
35 CERRWARN += $(SMOFF:%=-_smatch=--disable=%)
36
37 SMATCH_ =
38 SMATCH_on =
39 SMATCH_off = -_smatch=off
40
41 CERRWARN += $(SMATCH_$(SMATCH))
|