]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add check for sscanf without return use
authorJoe Perches <joe@perches.com>
Tue, 12 Nov 2013 23:10:15 +0000 (15:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:25 +0000 (12:09 +0900)
commit18bb0595748379132f83f8763d823df12eb4d2d3
tree27ee885ad9d07e3421f04e846a3507b74ffe1fa7
parent6791ddb7bf2b386c2bb59032de3b33b8e6101161
checkpatch: add check for sscanf without return use

Naked use sscanf can be troublesome because the pointed to variables may
not have been set.

Add a warning when the sscanf return value is not used.

For now, do not add __must_check to the sscanf prototype because that will
cause a couple of hundred new warnings when compiling a kernel.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl