From 5fd77195f4e52fcfa794b55afc5a1e5a68c3f2d7 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 7 Oct 2011 13:47:08 +0300 Subject: [PATCH] extra: don't print if the min-max as the value passed to the function Min-max is assumed so it's pointless to print this here. Not printing cuts down on the spam a little and makes the smatch database smaller. Signed-off-by: Dan Carpenter --- smatch_extra.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/smatch_extra.c b/smatch_extra.c index 16e84bd8..0b765ca5 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -995,13 +995,17 @@ static void match_call_info(struct expression *expr) name = get_variable_from_expr(expr->fn, NULL); FOR_EACH_PTR(expr->args, arg) { - const char *msg = "min-max"; - struct smatch_state *state; + struct range_list *rl = NULL; + char *msg; + + if (!get_implied_range_list(arg, &rl)) + goto next; + if (is_whole_range_rl(rl)) + goto next; - state = get_state_expr(my_id, arg); - if (state && strcmp(state->name, "unknown")) - msg = state->name; + msg = show_ranges(rl); sm_msg("info: passes param_value '%s' %d %s", name, i, msg); + next: i++; } END_FOR_EACH_PTR(arg); free_string(name); -- 2.11.4.GIT