From: Yunlong Song Date: Fri, 27 Feb 2015 11:53:46 +0000 (+0800) Subject: perf data: Fix sentinel setting for data_cmds array X-Git-Tag: v4.9.8~4301^2~74^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f924c29b5ab2257be88a2a4075d0800573d8479;p=platform%2Fkernel%2Flinux-rpi3.git perf data: Fix sentinel setting for data_cmds array 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 Cc: Peter Zijlstra Cc: Jiri Olsa Cc: Paul Mackerras Cc: Wang Nan Link: http://lkml.kernel.org/r/1425038026-27604-1-git-send-email-yunlong.song@huawei.com [ .name == NULL ends the loop, use it instead of seting all fields to NULL ] Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c index 9705ba7..155cf75 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)