Frameworks/base: Wall Werror in core/jni
Turn on -Wall -Werror in core/jni. Fix warnings.
Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.
Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index 7b3528b..e9d16c1 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -222,13 +222,12 @@
int len, nameLen;
bool skip, done = false;
- unsigned size = 0, resident = 0, pss = 0, swappable_pss = 0;
+ unsigned pss = 0, swappable_pss = 0;
float sharing_proportion = 0.0;
unsigned shared_clean = 0, shared_dirty = 0;
unsigned private_clean = 0, private_dirty = 0;
unsigned swapped_out = 0;
bool is_swappable = false;
- unsigned referenced = 0;
unsigned temp;
uint64_t start;
@@ -346,9 +345,9 @@
}
if (line[0] == 'S' && sscanf(line, "Size: %d kB", &temp) == 1) {
- size = temp;
+ /* size = temp; */
} else if (line[0] == 'R' && sscanf(line, "Rss: %d kB", &temp) == 1) {
- resident = temp;
+ /* resident = temp; */
} else if (line[0] == 'P' && sscanf(line, "Pss: %d kB", &temp) == 1) {
pss = temp;
} else if (line[0] == 'S' && sscanf(line, "Shared_Clean: %d kB", &temp) == 1) {
@@ -360,7 +359,7 @@
} else if (line[0] == 'P' && sscanf(line, "Private_Dirty: %d kB", &temp) == 1) {
private_dirty = temp;
} else if (line[0] == 'R' && sscanf(line, "Referenced: %d kB", &temp) == 1) {
- referenced = temp;
+ /* referenced = temp; */
} else if (line[0] == 'S' && sscanf(line, "Swap: %d kB", &temp) == 1) {
swapped_out = temp;
} else if (sscanf(line, "%" SCNx64 "-%" SCNx64 " %*s %*x %*x:%*x %*d", &start, &end) == 2) {
@@ -484,7 +483,6 @@
char line[1024];
jlong pss = 0;
jlong uss = 0;
- unsigned temp;
char tmp[128];
FILE *fp;