summaryrefslogtreecommitdiff
path: root/cpustats
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2017-10-18 16:28:14 -0700
committerChih-Hung Hsieh <chh@google.com>2017-10-20 15:46:36 -0700
commit373d3c7257fa815d0b9ee8f16874470a6002042e (patch)
tree2488faeb9a5a2dfd9f76054bd4ba001b4806ffb3 /cpustats
parentd7bf23ae7b93ec93b8b7c2ce98eaa2ea94f387aa (diff)
downloadextras-373d3c7257fa815d0b9ee8f16874470a6002042e.tar.gz
Use -Werror in system/extras
* Remove unused variables. * Fix redefined macro warnings. * Fix sign-compare warnings. * Fix 'return false' in main(). * Keep existing warnings to fix later. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: Ib92ef5297693595fb84ed4f8e61665bda4cee312
Diffstat (limited to 'cpustats')
-rw-r--r--cpustats/Android.mk1
-rw-r--r--cpustats/cpustats.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/cpustats/Android.mk b/cpustats/Android.mk
index 27899894..a6db30ff 100644
--- a/cpustats/Android.mk
+++ b/cpustats/Android.mk
@@ -2,6 +2,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := cpustats.c
+LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_MODULE_TAGS := debug
diff --git a/cpustats/cpustats.c b/cpustats/cpustats.c
index 375143b6..b2b7c07c 100644
--- a/cpustats/cpustats.c
+++ b/cpustats/cpustats.c
@@ -301,7 +301,7 @@ static long unsigned get_cpu_total_time(struct cpu_info *cpu) {
*/
static void print_stats() {
char label[8];
- int i, j;
+ int i;
char print_freq;
print_freq = should_print_freq_stats();