check_kernel_printf.c: Handle conditionals
commitf790dd374764ce5e46b616fe68205097de95f4c6
authorRasmus Villemoes <rv@rasmusvillemoes.dk>
Tue, 10 Feb 2015 21:05:23 +0000 (10 22:05 +0100)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Feb 2015 18:51:21 +0000 (11 21:51 +0300)
tree04c34a7f3df66b8c0ef93feb3948ccca70b907a3
parent15aded24139821bd44bf18833815a4bb82443de9
check_kernel_printf.c: Handle conditionals

There are many occurrences of completely harmless stuff like
'sprintf(buf, answer ? "Yes" : "No");'. We can make the warnings for
non-constant format argument somewhat less noisy by handling these
cases, while of course also providing better coverage. The simplest
way I could think of was to call check_printf_call recursively with
bits 16-17 of info indicating whether we should use the true or false
branch.
check_kernel_printf.c