From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752083AbdBOMw1 (ORCPT ); Wed, 15 Feb 2017 07:52:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50232 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767AbdBOMw0 (ORCPT ); Wed, 15 Feb 2017 07:52:26 -0500 Date: Wed, 15 Feb 2017 13:52:23 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Wang Nan , Linux Kernel Mailing List Subject: Re: perf bison: clang points out: error: conflicting types for 'parse_events_error' always evaluate to 'true' Message-ID: <20170215125223.GA12677@krava> References: <20170214182435.GD4458@kernel.org> <20170215105056.GB8207@krava> <20170215124102.GA4020@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170215124102.GA4020@kernel.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 15 Feb 2017 12:52:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 15, 2017 at 09:41:02AM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 15, 2017 at 11:50:56AM +0100, Jiri Olsa escreveu: > > On Tue, Feb 14, 2017 at 03:24:35PM -0300, Arnaldo Carvalho de Melo wrote: > > > util/pmu.c:948:28: error: address of array 'alias->unit' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] > > > if ((info->unit && alias->unit) || > > > ~~ ~~~~~~~^~~~ > > > util/pmu.c:953:13: error: address of array 'alias->unit' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] > > > if (alias->unit) > > > ~~ ~~~~~~~^~~~ > > > 2 errors generated. > > > > > > > > > So, is this test about having something on that alias->unit array? I.e. > > > should this suffice? > > > > yep, that seems right.. good catch > > Thanks, adding your Acked-by then, ok? yes > > How about this other one: > > CC /tmp/build/perf/util/trace-event-info.o > util/parse-events.y:699:6: error: conflicting types for 'parse_events_error' > void parse_events_error(YYLTYPE *loc, void *data, > ^ > /tmp/build/perf/util/parse-events-bison.c:2224:7: note: previous implicit declaration is here > yyerror (&yylloc, _data, scanner, YY_("syntax error")); > ^ > /tmp/build/perf/util/parse-events-bison.c:65:25: note: expanded from macro 'yyerror' > #define yyerror parse_events_error > ^ > 1 error generated. > hum, thats generated code.. I guess we need appropriate -Wno-... option ;-) jirka