Skip to content

Commit 6c49f35

Browse files
lucvoomasahir0y
authored andcommitted
kbuild: disable sparse warnings about unknown attributes
Currently, sparse issues warnings on code using an attribute it doesn't know about. One of the problem with this is that these warnings have no value for the developer, it's just noise for him. At best these warnings tell something about some deficiencies of sparse itself but not about a potential problem with code analyzed. A second problem with this is that sparse release are, alas, less frequent than new attributes are added to GCC. So, avoid the noise by asking sparse to not warn about attributes it doesn't know about. Reference: https://marc.info/?l=linux-sparse&m=151871600016790 Reference: https://marc.info/?l=linux-sparse&m=151871725417322 Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent 6127798 commit 6c49f35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ PYTHON = python
388388
CHECK = sparse
389389

390390
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
391-
-Wbitwise -Wno-return-void $(CF)
391+
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
392392
NOSTDINC_FLAGS =
393393
CFLAGS_MODULE =
394394
AFLAGS_MODULE =

0 commit comments

Comments
 (0)