[PATCH 23/23] perf bench: Use named initializers in the trailer too

From: Arnaldo Carvalho de Melo
Date: Mon Oct 19 2015 - 17:44:54 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

To avoid this splat with gcc 4.4.7:

cc1: warnings being treated as errors
bench/mem-functions.c:273: error: missing initializer
bench/mem-functions.c:273: error: (near initialization for âmemcpy_functions[4].descâ)
bench/mem-functions.c:366: error: missing initializer
bench/mem-functions.c:366: error: (near initialization for âmemset_functions[4].descâ)

Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Hitoshi Mitake <mitake@xxxxxxxxxxxxxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-0s8o6tgw1pdwvdv02llb9tkd@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/bench/mem-functions.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/bench/mem-functions.c b/tools/perf/bench/mem-functions.c
index d1de9c4a7ddf..9419b944220f 100644
--- a/tools/perf/bench/mem-functions.c
+++ b/tools/perf/bench/mem-functions.c
@@ -270,7 +270,7 @@ struct function memcpy_functions[] = {
# undef MEMCPY_FN
#endif

- { NULL, }
+ { .name = NULL, }
};

static const char * const bench_mem_memcpy_usage[] = {
@@ -363,7 +363,7 @@ static const struct function memset_functions[] = {
# undef MEMSET_FN
#endif

- { NULL, }
+ { .name = NULL, }
};

int bench_mem_memset(int argc, const char **argv, const char *prefix __maybe_unused)
--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/