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.
This commit is contained in:
Mike Frysinger
2021-05-15 10:48:02 -04:00
parent c5a2e0123b
commit be2bc30f9c
22 changed files with 122 additions and 54 deletions

View File

@@ -528,7 +528,7 @@ parse_reg_property(device *current,
if (device_nr_size_cells(bus) > 0)
chp = parse_size(current, bus, chp, &regs[reg_nr].size);
else
memset(&regs[reg_nr].size, 0, sizeof (&regs[reg_nr].size));
memset(&regs[reg_nr].size, 0, sizeof (regs[reg_nr].size));
}
/* create it */