perf bench: Use named initializers in the trailer too
authorArnaldo Carvalho de Melo <[email protected]>
Mon, 19 Oct 2015 21:17:25 +0000 (18:17 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 19 Oct 2015 21:17:25 +0000 (18:17 -0300)
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 <[email protected]>
Cc: Hitoshi Mitake <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/bench/mem-functions.c

index d1de9c4a7ddf56db5b4c06a438355118e05f6f82..9419b944220f6fc85f9b9593cce81639e7097cad 100644 (file)
@@ -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)