smatch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Levon <levon@movementarian.org>
Subject: [PATCH 11/18] Convert some sm_msg() into more specific reporting routines.
Date: Thu, 22 Nov 2018 18:27:17 +0000	[thread overview]
Message-ID: <E1gQCRX-00068I-2H@movementarian.org> (raw)

Signed-off-by: John Levon <levon@movementarian.org>
---
 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 0a993e99..43d9acdc 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 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.14.1

                 reply	other threads:[~2018-11-24  1:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1gQCRX-00068I-2H@movementarian.org \
    --to=levon@movementarian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).