[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170828093341.GA15692@krava>
Date: Mon, 28 Aug 2017 11:33:41 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: David Carrillo-Cisneros <davidcc@...gle.com>
Cc: linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Stephane Eranian <eranian@...gle.com>,
Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH 5/6] perf tools: Remove BUG_ON char[] to bool implicit
conversions
On Sun, Aug 27, 2017 at 12:54:41AM -0700, David Carrillo-Cisneros wrote:
> When compiling with LLVM, errors like this are shown:
>
> builtin-lock.c:46:10: error: implicit conversion turns string literal into bool: 'const char [39]' to 'bool'
>
> Due to error message implicit conversion into bool. Fix it by defining a
> BUG macro without a boolean argument and use it instead.
>
> Signed-off-by: David Carrillo-Cisneros <davidcc@...gle.com>
> ---
> tools/include/linux/kernel.h | 2 ++
> tools/perf/builtin-lock.c | 15 ++++++++++-----
> 2 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
> index 77d2e94ca5df..0951c96205c4 100644
> --- a/tools/include/linux/kernel.h
> +++ b/tools/include/linux/kernel.h
> @@ -70,6 +70,8 @@
> #endif
> #endif
>
> +#define BUG() abort()
we have some of those in tools/include/asm/bug.h
some might suit you, I think we wanted to omit BUG calls completely
jirka
Powered by blists - more mailing lists