On Wed, Apr 09, 2014 at 09:02:16PM +0200, Jonas Ådahl wrote: > Rewrite the tp_for_each_touch macro to always assign the iterator. > Practically it was already always assigning as ntouches is always more > than 0, but this way we avoid a compiler warning by not relying on an > external variable for initiating the iterator. > > Signed-off-by: Jonas Ådahl <[email protected]>
6, 7, and this one Reviewed-by: Peter Hutterer <[email protected]> Cheers, Peter > --- > src/evdev-mt-touchpad.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h > index 2bdb329..3377789 100644 > --- a/src/evdev-mt-touchpad.h > +++ b/src/evdev-mt-touchpad.h > @@ -141,7 +141,7 @@ struct tp_dispatch { > }; > > #define tp_for_each_touch(_tp, _t) \ > - for (unsigned int _i = 0; _i < (_tp)->ntouches && (_t = > &(_tp)->touches[_i]); _i++) > + for (_t = (_tp)->touches; _t < (_tp)->touches + (_tp)->ntouches; _t++) > > void > tp_get_delta(struct tp_touch *t, double *dx, double *dy); > -- > 1.8.3.2 > > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel > _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
