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/android/console.c b/android/console.c
index ccd0426..a6b2239 100644
--- a/android/console.c
+++ b/android/console.c
@@ -2265,8 +2265,7 @@
double params[ NUM_GEO_PARAMS ];
int n_satellites = 1;
- static int last_time = 0;
- static double last_altitude = 0.;
+ static int last_time = 0;
if (!p)
p = "";
@@ -2367,7 +2366,6 @@
/* optional altitude + bogus diff */
if (top_param >= GEO_ALT) {
stralloc_add_format( s, ",%.1g,M,0.,M", params[GEO_ALT] );
- last_altitude = params[GEO_ALT];
} else {
stralloc_add_str( s, ",,,," );
}