]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: add check for sscanf without return use
authorJoe Perches <joe@perches.com>
Tue, 5 Nov 2013 05:56:58 +0000 (16:56 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:56:58 +0000 (16:56 +1100)
commit986e9823356d4fd13ca517a5017901190104cc4a
tree1466f6845ef3c1275890033f8327996f721619da
parent1d263d5cea3360eeee11b9556c63c51cee51068e
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>
scripts/checkpatch.pl