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 <davi...@google.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

Reply via email to