From 842f89436fa9dee3051e9a494b9a52394b2ccc76 Mon Sep 17 00:00:00 2001 From: John Levon Date: Tue, 27 Nov 2018 10:53:24 +0000 Subject: [PATCH] Convert some sm_msg() into more specific reporting routines. Signed-off-by: John Levon Signed-off-by: Dan Carpenter --- check_kernel_printf.c | 2 +- smatch_slist.c | 2 +- smatch_sval.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/check_kernel_printf.c b/check_kernel_printf.c index 38ae02b1..c85dac1e 100644 --- a/check_kernel_printf.c +++ b/check_kernel_printf.c @@ -855,7 +855,7 @@ check_format_string(const char *fmt, const char *caller) f = strstr(fmt, caller); if (f && strstr(f+1, caller)) - sm_msg("note: format string contains name of enclosing function '%s' twice", caller); + sm_warning("format string contains name of enclosing function '%s' twice", caller); return f != NULL; } diff --git a/smatch_slist.c b/smatch_slist.c index 4dd7b55b..ab0ca19d 100644 --- a/smatch_slist.c +++ b/smatch_slist.c @@ -384,7 +384,7 @@ struct sm_state *merge_sm_states(struct sm_state *one, struct sm_state *two) return one; if (out_of_memory()) { if (!warned) - sm_msg("Function too hairy. No more merges."); + sm_warning("Function too hairy. No more merges."); warned = 1; return one; } diff --git a/smatch_sval.c b/smatch_sval.c index 725509ae..307224e5 100644 --- a/smatch_sval.c +++ b/smatch_sval.c @@ -380,10 +380,10 @@ static sval_t sval_binop_signed(struct symbol *type, sval_t left, int op, sval_t break; case '/': if (right.value == 0) { - sm_msg("debug: %s: divide by zero", __func__); + sm_debug("%s: divide by zero", __func__); ret.value = 123456789; } else if (left.value == LLONG_MIN && right.value == -1) { - sm_msg("debug: %s: invalid divide LLONG_MIN/-1", __func__); + sm_debug("%s: invalid divide LLONG_MIN/-1", __func__); ret.value = 12345678; } else { ret.value = left.value / right.value; -- 2.11.4.GIT