diff options
author | Chih-Hung Hsieh <chh@google.com> | 2017-10-18 16:28:14 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2017-10-20 15:46:36 -0700 |
commit | 373d3c7257fa815d0b9ee8f16874470a6002042e (patch) | |
tree | 2488faeb9a5a2dfd9f76054bd4ba001b4806ffb3 /latencytop | |
parent | d7bf23ae7b93ec93b8b7c2ce98eaa2ea94f387aa (diff) | |
download | extras-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 'latencytop')
-rw-r--r-- | latencytop/Android.mk | 2 | ||||
-rw-r--r-- | latencytop/latencytop.c | 11 |
2 files changed, 1 insertions, 12 deletions
diff --git a/latencytop/Android.mk b/latencytop/Android.mk index 220f4e36..6649a83b 100644 --- a/latencytop/Android.mk +++ b/latencytop/Android.mk @@ -23,6 +23,6 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) LOCAL_MODULE_TAGS := debug -LOCAL_CFLAGS := -Wno-unused-parameter +LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter include $(BUILD_EXECUTABLE) diff --git a/latencytop/latencytop.c b/latencytop/latencytop.c index 667fbf7e..d20bd7f5 100644 --- a/latencytop/latencytop.c +++ b/latencytop/latencytop.c @@ -46,11 +46,9 @@ static struct latency_entry *read_process_stats(struct latency_entry *list, int static struct latency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int tid, int fatal); static struct latency_entry *alloc_latency_entry(void); -static void free_latency_entry(struct latency_entry *e); static void set_latencytop(int on); static struct latency_entry *read_latency_file(FILE *f, struct latency_entry *list); -static void erase_latency_file(FILE *f); static struct latency_entry *find_latency_entry(struct latency_entry *e, char *reason); static void print_latency_entries(struct latency_entry *head); @@ -286,11 +284,6 @@ static struct latency_entry *alloc_latency_entry(void) { return e; } -static void free_latency_entry(struct latency_entry *e) { - e->next = free_entries; - free_entries = e; -} - static struct latency_entry *find_latency_entry(struct latency_entry *head, char *reason) { struct latency_entry *e; @@ -319,10 +312,6 @@ static void set_latencytop(int on) { fclose(f); } -static void erase_latency_file(FILE *f) { - fprintf(f, "erase\n"); -} - static struct latency_entry *read_latency_file(FILE *f, struct latency_entry *list) { struct latency_entry *e, *head; char line[MAX_LINE]; |