From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed] sim: igen: fix format-zero-length warnings
Date: Mon, 8 Jan 2024 21:27:12 -0500 [thread overview]
Message-ID: <20240109022712.5162-1-vapier@gentoo.org> (raw)
Fix warnings from calling printf functions with "" which normally
is useless.
---
sim/igen/gen.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sim/igen/gen.c b/sim/igen/gen.c
index 2176b603fc59..30cf10770334 100644
--- a/sim/igen/gen.c
+++ b/sim/igen/gen.c
@@ -67,7 +67,11 @@ print_gen_entry_path (const line_ref *line,
if (table->top->model != NULL)
print (line, "%s", table->top->model->name);
else
- print (line, "");
+ {
+ /* We don't want to output things, but we want the side-effects they
+ might have (e.g. checking line != NULL). */
+ print (line, "%s", "");
+ }
}
else
{
@@ -1242,7 +1246,7 @@ gen_entry_expand_insns (gen_entry *table)
print_gen_entry_insns (table, warning,
"was not uniquely decoded",
"decodes to the same entry");
- error (NULL, "");
+ error (NULL, "unrecoverable\n");
}
return;
}
@@ -1385,7 +1389,7 @@ gen_entry_expand_insns (gen_entry *table)
warning (NULL,
": Applying rule just copied all instructions\n");
print_gen_entry_insns (entry, warning, "Copied", NULL);
- error (NULL, "");
+ error (NULL, "unrecoverable\n");
}
}
}
--
2.43.0
reply other threads:[~2024-01-09 2:27 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=20240109022712.5162-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.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).