Re: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast

2016-08-08 Thread Richard Henderson
On 08/08/2016 03:32 PM, Paolo Bonzini wrote: On 08/08/2016 12:00, Richard Henderson wrote: On 08/08/2016 03:25 PM, Paolo Bonzini wrote: + __builtin_choose_expr( \ + __builtin_types_compatible_p(typeof(expr), const char) ||\

Re: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast

2016-08-08 Thread Paolo Bonzini
On 08/08/2016 12:00, Richard Henderson wrote: > On 08/08/2016 03:25 PM, Paolo Bonzini wrote: >> + >> __builtin_choose_expr( \ >> + __builtin_types_compatible_p(typeof(expr), const char) >> ||\ >> +__builtin_ty

Re: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast

2016-08-08 Thread Richard Henderson
On 08/08/2016 03:25 PM, Paolo Bonzini wrote: +__builtin_choose_expr( \ + __builtin_types_compatible_p(typeof(expr), const char) || \ +__builtin_types_compatible_p(typeof(expr), char), \ +

Re: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast

2016-08-08 Thread Paolo Bonzini
On 08/08/2016 11:27, Paolo Bonzini wrote: > > > On 08/08/2016 11:05, Paolo Bonzini wrote: /home/pranith/devops/code/qemu/include/qemu/seqlock.h:62:21: warning: passing 'typeof (*&sl->sequence) *' (aka 'const unsigned int *') to parameter of type 'unsigned int *' discards qualif

Re: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast

2016-08-08 Thread Paolo Bonzini
On 08/08/2016 11:05, Paolo Bonzini wrote: >> > /home/pranith/devops/code/qemu/include/qemu/seqlock.h:62:21: warning: >> > passing 'typeof (*&sl->sequence) *' (aka 'const unsigned int *') to >> > parameter of type 'unsigned int *' discards qualifier >> > s [-Wincompatible-pointer-types-discards-

Re: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast

2016-08-08 Thread Paolo Bonzini
On 07/08/2016 03:41, Pranith Kumar wrote: > With the latest clang, we have the following warning. We are not using > the const qualifier consistently in other functions. So remove it from > the only one that uses it to fix the warning. > > /home/pranith/devops/code/qemu/include/qemu/seqlock.h:62

[Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast

2016-08-06 Thread Pranith Kumar
With the latest clang, we have the following warning. We are not using the const qualifier consistently in other functions. So remove it from the only one that uses it to fix the warning. /home/pranith/devops/code/qemu/include/qemu/seqlock.h:62:21: warning: passing 'typeof (*&sl->sequence) *' (ak