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 /idlestat.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 'idlestat.c')
-rw-r--r-- | idlestat.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -47,6 +47,7 @@ #include "energy_model.h" #include "report_ops.h" #include "trace_ops.h" +#include "compiler.h" #define IDLESTAT_VERSION "0.5" #define USEC_PER_SEC 1000000 @@ -181,8 +182,13 @@ static int display_pstates(struct report_ops *ops, void *arg, void *baseline, ch return 0; } -static int display_wakeup(struct report_ops *ops, void *arg, void *baseline, char *cpu, void *report_data) +static int display_wakeup(struct report_ops *ops, void *arg, UNUSED void *baseline, char *cpu, void *report_data) { + /* + * FIXME: This function is lacking comparison report support + * When adding the feature, remember to remove the UNUSED tag + * from baseline parameter. + */ int i; bool cpu_header = false; struct cpuidle_cstates *cstates = arg; |