From fa0d1a5d2ce3a4606e20f0af534e7cc6ff8c9bba Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 21 Jan 2014 12:31:51 +0300 Subject: [PATCH] deref: dereferencing uninitialized warnings should be under --spammy GCC normally warns if you use an uninitialized variable but it doesn't warn if you dereference an uninitialized variable. That is the reason for this Smatch warning. But it has too many false positives and should always have been under the --spammy flag. Signed-off-by: Dan Carpenter --- check_deref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_deref.c b/check_deref.c index 6af9a9cf..54ea7253 100644 --- a/check_deref.c +++ b/check_deref.c @@ -78,7 +78,7 @@ static void check_dereference(struct expression *expr) sm_msg("error: potential NULL dereference '%s'.", tmp->name); return; } - if (tmp->state == &uninitialized) { + if (tmp->state == &uninitialized && option_spammy) { sm_msg("error: potentially dereferencing uninitialized '%s'.", tmp->name); return; } -- 2.11.4.GIT