* [PATCH] perf tools: Fix a building error introduced by recent new patch @ 2015-02-27 11:53 Yunlong Song 2015-02-27 13:36 ` Arnaldo Carvalho de Melo 2015-02-28 9:32 ` [tip:perf/core] perf data: Fix sentinel setting for data_cmds array tip-bot for Yunlong Song 0 siblings, 2 replies; 4+ messages in thread From: Yunlong Song @ 2015-02-27 11:53 UTC (permalink / raw) To: a.p.zijlstra, paulus, mingo, acme; +Cc: linux-kernel, wangnan0, jolsa 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@huawei.com> --- 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 9705ba7..0385063 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 }, + { NULL, NULL, NULL }, }; int cmd_data(int argc, const char **argv, const char *prefix) -- 1.8.5.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf tools: Fix a building error introduced by recent new patch 2015-02-27 11:53 [PATCH] perf tools: Fix a building error introduced by recent new patch Yunlong Song @ 2015-02-27 13:36 ` Arnaldo Carvalho de Melo 2015-02-27 13:40 ` Arnaldo Carvalho de Melo 2015-02-28 9:32 ` [tip:perf/core] perf data: Fix sentinel setting for data_cmds array tip-bot for Yunlong Song 1 sibling, 1 reply; 4+ messages in thread From: Arnaldo Carvalho de Melo @ 2015-02-27 13:36 UTC (permalink / raw) To: Yunlong Song; +Cc: a.p.zijlstra, paulus, mingo, linux-kernel, wangnan0, jolsa Em Fri, Feb 27, 2015 at 07:53:46PM +0800, Yunlong Song escreveu: > 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@huawei.com> > --- > 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 9705ba7..0385063 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 }, > + { NULL, NULL, NULL }, I guess here we could just do it as: { NULL, }, Will check and apply that instead, as it is more "future proof", i.e. if a new field is introduced to this struct, one doesn't need to bother updating the data_cmds array sentinel. - Arnaldo > }; > > int cmd_data(int argc, const char **argv, const char *prefix) > -- > 1.8.5.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf tools: Fix a building error introduced by recent new patch 2015-02-27 13:36 ` Arnaldo Carvalho de Melo @ 2015-02-27 13:40 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 4+ messages in thread From: Arnaldo Carvalho de Melo @ 2015-02-27 13:40 UTC (permalink / raw) To: Yunlong Song; +Cc: a.p.zijlstra, paulus, mingo, linux-kernel, wangnan0, jolsa Em Fri, Feb 27, 2015 at 10:36:06AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 27, 2015 at 07:53:46PM +0800, Yunlong Song escreveu: > > 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@huawei.com> > > --- > > 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 9705ba7..0385063 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 }, > > + { NULL, NULL, NULL }, > > I guess here we could just do it as: > > { NULL, }, > > Will check and apply that instead, as it is more "future proof", i.e. if > a new field is introduced to this struct, one doesn't need to bother > updating the data_cmds array sentinel. Also please mention the gcc version, as this is not a problem in my devel machine, where I have: [acme@ssdandy linux]$ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) [acme@ssdandy linux]$ But I'll get those VMs with more distros working again... Thanks for the report! - Arnaldo ^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf data: Fix sentinel setting for data_cmds array 2015-02-27 11:53 [PATCH] perf tools: Fix a building error introduced by recent new patch Yunlong Song 2015-02-27 13:36 ` Arnaldo Carvalho de Melo @ 2015-02-28 9:32 ` tip-bot for Yunlong Song 1 sibling, 0 replies; 4+ messages in thread From: tip-bot for Yunlong Song @ 2015-02-28 9:32 UTC (permalink / raw) To: linux-tip-commits Cc: hpa, a.p.zijlstra, acme, wangnan0, mingo, linux-kernel, jolsa, paulus, yunlong.song, tglx Commit-ID: 1f924c29b5ab2257be88a2a4075d0800573d8479 Gitweb: http://git.kernel.org/tip/1f924c29b5ab2257be88a2a4075d0800573d8479 Author: Yunlong Song <yunlong.song@huawei.com> AuthorDate: Fri, 27 Feb 2015 19:53:46 +0800 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Fri, 27 Feb 2015 10:43:18 -0300 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 <yunlong.song@huawei.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Wang Nan <wangnan0@huawei.com> 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 <acme@redhat.com> --- 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 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) ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-28 9:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-02-27 11:53 [PATCH] perf tools: Fix a building error introduced by recent new patch Yunlong Song 2015-02-27 13:36 ` Arnaldo Carvalho de Melo 2015-02-27 13:40 ` Arnaldo Carvalho de Melo 2015-02-28 9:32 ` [tip:perf/core] perf data: Fix sentinel setting for data_cmds array tip-bot for Yunlong Song
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox