[PATCH] Fix "warning: cast from pointer to integer of different size"

Peter Hutterer peter.hutterer at who-t.net
Wed Feb 4 15:11:42 PST 2009


On Wed, Feb 04, 2009 at 08:20:24PM +0100, Tomas Carnecky wrote:
> Signed-off-by: Tomas Carnecky <tom at dbservice.com>
> ---
> 
> Peter, I removed the cast, it seems superfluous. But if you insist
> on using a cast, please change it to (long).

That's a leftover that didn't get removed in the final rebases.
Merged in my tree, will find it's way upstream soon. Thanks.

Cheers,
  Peter
> 
>  dix/enterleave.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/dix/enterleave.c b/dix/enterleave.c
> index 1a5f1b5..b8de9f0 100644
> --- a/dix/enterleave.c
> +++ b/dix/enterleave.c
> @@ -1077,8 +1077,8 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
>                  if (ptrwin && IsParent(root, ptrwin))
>                      CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE);
>              }
> -            CoreFocusEvent(dev, FocusOut, mode, ((int)A) ? NotifyPointerRoot : NotifyDetailNone, root);
> -            CoreFocusEvent(dev, FocusIn, mode, ((int)B) ? NotifyPointerRoot : NotifyDetailNone, root);
> +            CoreFocusEvent(dev, FocusOut, mode, A ? NotifyPointerRoot : NotifyDetailNone, root);
> +            CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root);
>              if (B == PointerRootWin)
>                  CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE);
>          }
> @@ -1128,7 +1128,7 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev,
>          root = WindowTable[i];
>          if (!HasFocus(root) && !FirstFocusChild(root))
>          {
> -            CoreFocusEvent(dev, FocusIn, mode, ((int)B) ? NotifyPointerRoot : NotifyDetailNone, root);
> +            CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root);
>              if (B == PointerRootWin)
>                  CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE);
>          }
> @@ -1169,7 +1169,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev,
>                  if (ptrwin)
>                      CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE);
>              }
> -            CoreFocusEvent(dev, FocusOut, mode, ((int)A) ? NotifyPointerRoot : NotifyDetailNone, root);
> +            CoreFocusEvent(dev, FocusOut, mode, A ? NotifyPointerRoot : NotifyDetailNone, root);
>          }
>      }
>  
> -- 
> 1.6.1.2



More information about the xorg mailing list