From be2bc30f9cb3e8dd8b566db551a8ce3cc305e015 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 15 May 2021 10:48:02 -0400 Subject: 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. --- sim/ppc/hw_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/ppc/hw_glue.c') 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); -- cgit v1.1