[PATCH 09/12] Convert some sm_msg() into more specific reporting routines.

John Levon <[email protected]>
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
Signed-off-by: John Levon <[email protected]>
---
 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 38ae02b..c85dac1 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 0a993e9..43d9acd 100644
--- a/smatch_slist.c
+++ b/smatch_slist.c
@@ -379,7 +379,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 725509a..307224e 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;
-- 
1.8.3.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.