[PATCH 1/3] input: warning fix
Peter Hutterer
peter.hutterer at who-t.net
Tue Mar 8 14:22:57 PST 2011
On Tue, Mar 08, 2011 at 03:33:11PM -0500, Adam Jackson wrote:
> getevents.c:770:5: warning: suggest parentheses around '&&' within '||'
>
> Introduced with dc57f89959e549403f8488eb9f23425bd7118b22:
>
> - if(dev->u.master && dev->valuator) {
> + if(dev->valuator && IsMaster(dev) || !IsFloating(dev)) {
>
> So I'm assuming the two terms around the || are meant to be a unit.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>
all three merged, thanks.
Cheers,
Peter
> ---
> dix/getevents.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/dix/getevents.c b/dix/getevents.c
> index 5b8e379..4bca1b0 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -767,7 +767,7 @@ moveRelative(DeviceIntPtr dev, int *x, int *y, ValuatorMask *mask)
> /* if attached, clip both x and y to the defined limits (usually
> * co-ord space limit). If it is attached, we need x/y to go over the
> * limits to be able to change screens. */
> - if(dev->valuator && IsMaster(dev) || !IsFloating(dev)) {
> + if (dev->valuator && (IsMaster(dev) || !IsFloating(dev))) {
> if (valuator_get_mode(dev, 0) == Absolute)
> clipAxis(dev, 0, x);
> if (valuator_get_mode(dev, 1) == Absolute)
> --
> 1.7.3.5
More information about the xorg-devel
mailing list