[PATCH 08/19] perf data: Fix sentinel setting for data_cmds array

From: Arnaldo Carvalho de Melo
Date: Fri Feb 27 2015 - 14:26:43 EST


From: Yunlong Song <yunlong.song@xxxxxxxxxx>

The recent new patch "perf tools: Add new 'perf data' command" (commit
2245bf14 in acme's git repo perf/core) has caused a building error when
compiling the source code of perf:

cc1: warnings being treated as errors
builtin-data.c:89: error: missing initializer
builtin-data.c:89: error: (near initialization for âdata_cmds[1].summaryâ)
make[2]: *** [builtin-data.o] Error 1
make[2]: *** Waiting for unfinished jobs....
LD bench/perf-in.o
LD tests/perf-in.o
make[1]: *** [perf-in.o] Error 2
make: *** [all] Error 2

This patch fixes the building error above.

Signed-off-by: Yunlong Song <yunlong.song@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1425038026-27604-1-git-send-email-yunlong.song@xxxxxxxxxx
[ .name == NULL ends the loop, use it instead of seting all fields to NULL ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/builtin-data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
index 9705ba7e4c16..155cf75b8199 100644
--- a/tools/perf/builtin-data.c
+++ b/tools/perf/builtin-data.c
@@ -86,7 +86,7 @@ static int cmd_data_convert(int argc, const char **argv,

static struct data_cmd data_cmds[] = {
{ "convert", "converts data file between formats", cmd_data_convert },
- { NULL },
+ { .name = NULL, },
};

int cmd_data(int argc, const char **argv, const char *prefix)
--
1.9.3

--
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/