diff options
author | Mike Frysinger <vapier@gentoo.org> | 2024-01-08 21:15:51 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-08 21:25:55 -0500 |
commit | 5048cb28f4a864d2426bcec8cb02f26ef3daac85 (patch) | |
tree | d5bfe61fd5e2de8713f2584f902152e5c582567c /sim | |
parent | c6352113d200d3ad71cc1d02ec582bf2732d1531 (diff) | |
download | fsf-binutils-gdb-5048cb28f4a864d2426bcec8cb02f26ef3daac85.zip fsf-binutils-gdb-5048cb28f4a864d2426bcec8cb02f26ef3daac85.tar.gz fsf-binutils-gdb-5048cb28f4a864d2426bcec8cb02f26ef3daac85.tar.bz2 |
sim: igen: fix format-zero-length warnings
Fix warnings from calling printf functions with "" which normally
is useless.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/igen/gen.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sim/igen/gen.c b/sim/igen/gen.c index 2176b60..30cf107 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"); } } } |