aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/hw_glue.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-15 10:48:02 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-15 11:00:00 -0400
commitbe2bc30f9cb3e8dd8b566db551a8ce3cc305e015 (patch)
treeb956da9b71b744d3600ee4a1a7817c4f92f3c2ba /sim/ppc/hw_glue.c
parentc5a2e0123b7241be6a2022f1acb8fa700dda628a (diff)
downloadgdb-be2bc30f9cb3e8dd8b566db551a8ce3cc305e015.zip
gdb-be2bc30f9cb3e8dd8b566db551a8ce3cc305e015.tar.gz
gdb-be2bc30f9cb3e8dd8b566db551a8ce3cc305e015.tar.bz2
sim: ppc: clean up various warnings
A random grab bag of minor fixes to enable -Werror for this port. Cast address vars to long when the format was using %l. Use %zu with sizeof operations. Add const to a bunch of strings. Trim unused variables. Fix sizeof call to calculate target storage and not the pointer itself.
Diffstat (limited to 'sim/ppc/hw_glue.c')
-rw-r--r--sim/ppc/hw_glue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/ppc/hw_glue.c b/sim/ppc/hw_glue.c
index c824773..2af2434 100644
--- a/sim/ppc/hw_glue.c
+++ b/sim/ppc/hw_glue.c
@@ -193,13 +193,13 @@ hw_glue_init_address(device *me)
if (glue->sizeof_output == 0)
device_error(me, "at least one reg property size must be nonzero");
if (glue->sizeof_output % sizeof(unsigned_word) != 0)
- device_error(me, "reg property size must be %d aligned", sizeof(unsigned_word));
+ device_error(me, "reg property size must be %zu aligned", sizeof(unsigned_word));
/* and the address */
device_address_to_attach_address(device_parent(me),
&unit.address, &glue->space, &glue->address,
me);
if (glue->address % (sizeof(unsigned_word) * max_nr_interrupts) != 0)
- device_error(me, "reg property address must be %d aligned",
+ device_error(me, "reg property address must be %zu aligned",
sizeof(unsigned_word) * max_nr_interrupts);
glue->nr_outputs = glue->sizeof_output / sizeof(unsigned_word);
glue->output = zalloc(glue->sizeof_output);