public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Wang Nan <wangnan0@huawei.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: perf bison: clang points out: error: conflicting types for 'parse_events_error' always evaluate to 'true'
Date: Wed, 15 Feb 2017 13:52:23 +0100	[thread overview]
Message-ID: <20170215125223.GA12677@krava> (raw)
In-Reply-To: <20170215124102.GA4020@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

  reply	other threads:[~2017-02-15 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 18:24 perf pmu: clang points out: address of array 'alias->unit' will always evaluate to 'true' Arnaldo Carvalho de Melo
2017-02-15 10:50 ` Jiri Olsa
2017-02-15 12:41   ` perf bison: clang points out: error: conflicting types for 'parse_events_error' " Arnaldo Carvalho de Melo
2017-02-15 12:52     ` Jiri Olsa [this message]
2017-02-15 13:06       ` perf build with clang, modulo libpython: " Arnaldo Carvalho de Melo
2017-02-15 13:21         ` Jiri Olsa
2017-02-16 20:05         ` [tip:perf/core] perf tools: Add missing parse_events_error() prototype tip-bot for Arnaldo Carvalho de Melo
2017-02-16 20:04 ` [tip:perf/core] perf pmu: Fix check for unset alias->unit array tip-bot for Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170215125223.GA12677@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox