Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752664AbbB0NgN (ORCPT ); Fri, 27 Feb 2015 08:36:13 -0500 Received: from mail.kernel.org ([198.145.29.136]:40168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbbB0NgM (ORCPT ); Fri, 27 Feb 2015 08:36:12 -0500 Date: Fri, 27 Feb 2015 10:36:06 -0300 From: Arnaldo Carvalho de Melo To: Yunlong Song Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com, linux-kernel@vger.kernel.org, wangnan0@huawei.com, jolsa@kernel.org Subject: Re: [PATCH] perf tools: Fix a building error introduced by recent new patch Message-ID: <20150227133606.GF13373@kernel.org> References: <1425038026-27604-1-git-send-email-yunlong.song@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1425038026-27604-1-git-send-email-yunlong.song@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2083 Lines: 59 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 > --- > 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/ -- 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/