diff options
author | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2015-01-21 16:29:09 +0200 |
---|---|---|
committer | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2015-01-22 03:47:03 +0200 |
commit | 4fed8af2a0c606381c6116e2da9a860dc76b3b8d (patch) | |
tree | 736e734300150fead2e5970be65c73702a1bc413 /comparison_report.c | |
parent | 637fb48a9ae66053cc73d1e5b9bc22edf1eb9b93 (diff) |
Add -Wunused-parameter to CFLAGS
Android complation checks that all parameters are used. Add
check for this condition to default compilation as well. For
cases where the parameter is legitimately not used, add a
macro UNUSED to flag such cases for the compiler. This macro
is defined in a new header file. Currently this macro is
defined functional if the preprocessor macro __GNUC__ is
defined, otherwise the macro expands to an empty comment.
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Diffstat (limited to 'comparison_report.c')
-rw-r--r-- | comparison_report.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/comparison_report.c b/comparison_report.c index c8444f5..e749c19 100644 --- a/comparison_report.c +++ b/comparison_report.c @@ -35,6 +35,7 @@ #include "report_ops.h" #include "idlestat.h" #include "utils.h" +#include "compiler.h" struct compare_report_data { struct cpuidle_cstate *curr_cstate_baseline; @@ -78,7 +79,7 @@ static int compare_check_options(struct program_options *options) return 0; } -static void * compare_alloc_data(struct program_options *options) +static void * compare_alloc_data(UNUSED struct program_options *options) { struct compare_report_data *ret = calloc(sizeof(*ret), 1); @@ -94,7 +95,8 @@ static void compare_release_data(void *data) } -static void compare_cstate_single_state(struct cpuidle_cstate *c, void *report_data) +static void compare_cstate_single_state(struct cpuidle_cstate *c, + void *report_data) { struct cpuidle_cstate empty; struct cpuidle_cstate diff; @@ -166,7 +168,8 @@ static void compare_cstate_single_state(struct cpuidle_cstate *c, void *report_d printf("\n"); } -static void compare_set_baseline_cstate(struct cpuidle_cstate *b, void *report_data) +static void compare_set_baseline_cstate(struct cpuidle_cstate *b, + void *report_data) { struct compare_report_data *rdata; @@ -190,7 +193,8 @@ static void compare_cstate_end_cpu(void *report_data) } -static void compare_pstate_single_freq(struct cpufreq_pstate *p, void *report_data) +static void compare_pstate_single_freq(struct cpufreq_pstate *p, + void *report_data) { struct cpufreq_pstate empty; struct cpufreq_pstate diff; @@ -258,7 +262,8 @@ static void compare_pstate_single_freq(struct cpufreq_pstate *p, void *report_da printf("\n"); } -static void compare_set_baseline_pstate(struct cpufreq_pstate *b, void *report_data) +static void compare_set_baseline_pstate(struct cpufreq_pstate *b, + void *report_data) { struct compare_report_data *rdata; |