From 256e4a0158d211cb68ee900a2240f00de64ca282 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 19 Jan 2015 17:20:41 +0300 Subject: [PATCH] type_value: list_entry is safe as well This was always set to something of the same type. Ignore these. Signed-off-by: Dan Carpenter --- smatch_type_val.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/smatch_type_val.c b/smatch_type_val.c index c3818b0a..eff30b1c 100644 --- a/smatch_type_val.c +++ b/smatch_type_val.c @@ -173,7 +173,7 @@ static int is_ignored_fake_assignment(void) return has_link; } -static int is_ignored_container_of(void) +static int is_ignored_macro(void) { struct expression *expr; char *name; @@ -186,6 +186,8 @@ static int is_ignored_container_of(void) return 0; if (strcmp(name, "container_of") == 0) return 1; + if (strcmp(name, "list_entry") == 0) + return 1; return 0; } @@ -209,7 +211,7 @@ static void match_assign_value(struct expression *expr) goto free; if (is_fake_call(expr->right)) { - if (is_ignored_container_of()) + if (is_ignored_macro()) goto free; add_fake_type_val(member, alloc_whole_rl(get_type(expr->left)), is_ignored_fake_assignment()); goto free; -- 2.11.4.GIT