Cleanup: Remove 100+ compiler warnings.
This is a big cleanup that removes compiler warnings by performing
the following:
- Remove unused functions or variables.
- Change pointer cast to be alias safe using unions.
- Use __attribute__((unused)) on some local variable definitions
when their usage depends on conditional defines that are not
always true when compiling the same source several times.
- Fix a couple array indexing bugs.
There are still a few warnings from the JSON lexer, libjpeg and
the TCG helpers though, but the overall compilation is much cleaner.
BUG=NONE
Change-Id: Ic4483e6402b266ecfd7bca8c92a73d8fcf392a1f
diff --git a/hw/android/android_mips.c b/hw/android/android_mips.c
index a7b7b20..c55ef76 100644
--- a/hw/android/android_mips.c
+++ b/hw/android/android_mips.c
@@ -16,6 +16,7 @@
#include "sysemu/sysemu.h"
#include "hw/mips/mips.h"
#include "hw/android/goldfish/device.h"
+#include "hw/android/goldfish/pipe.h"
#include "android/globals.h"
#include "audio/audio.h"
#include "sysemu/blockdev.h"
@@ -124,7 +125,8 @@
if (initrd_size > 0)
sprintf (kernel_cmd, "%s rd_start=0x" TARGET_FMT_lx " rd_size=%li",
kernel_cmdline,
- PHYS_TO_VIRT(initrd_offset), initrd_size);
+ (hwaddr)PHYS_TO_VIRT(initrd_offset),
+ (long int)initrd_size);
else
strcpy (kernel_cmd, kernel_cmdline);