From 92b72316c2a4230aee428cf1394e12293af4df88 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 30 Nov 2018 15:49:21 +0300 Subject: [PATCH] extra/db: silence an invalid SQL warning I've added a NULL check a bit earlier so that we don't try to run invalid SQL. Signed-off-by: Dan Carpenter --- smatch_extra.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/smatch_extra.c b/smatch_extra.c index d611b9b7..c2d97a88 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -2164,6 +2164,14 @@ static int filter_unused_kzalloc_info(struct expression *call, int param, char * return 0; /* + * This is to handle __builtin_mul_overflow(). In an ideal world we + * would only need this for invalid code. + * + */ + if (!call->fn->symbol) + return 0; + + /* * kzalloc() information is treated as special because so there is just * a lot of stuff initialized to zero and it makes building the database * take hours and hours. -- 2.11.4.GIT