Hi, On 16 March 2017 at 22:52, Peter Hutterer <[email protected]> wrote: > On Thu, Mar 16, 2017 at 10:01:05AM +0000, Daniel Stone wrote: >> When the wheel tilt source is present, gcc complains that we don't >> handle all possible enumeration values. We already ensure this cannot >> happen in its only caller (handle_pointer_axis), but gcc doesn't >> recognise this. Give it a default value to quiet the warning. >> >> Signed-off-by: Daniel Stone <[email protected]> >> --- >> libweston/libinput-device.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/libweston/libinput-device.c b/libweston/libinput-device.c >> index f97afcf8..fd4ad64a 100644 >> --- a/libweston/libinput-device.c >> +++ b/libweston/libinput-device.c >> @@ -191,6 +191,8 @@ normalize_scroll(struct libinput_event_pointer >> *pointer_event, >> value = libinput_event_pointer_get_axis_value(pointer_event, >> axis); >> break; >> + default: >> + assert(!"unhandled event source in normalize_scroll\n"); > > drop the '\n' because it's not an actual printf: > test: test.c:4: main: Assertion `!"not meant to happen\n"' failed. > > otherwise > Reviewed-by: Peter Hutterer <[email protected]>
Heh! You're of course right, but had done that after a day of inserting hundreds of debug statements into compositor-drm, all suffixed with \n. Amended and pushed with your R-b, thanks. To ssh://git.freedesktop.org/git/wayland/weston 300bc6ef..4933ca5e 4933ca5e -> master Cheers, Daniel _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
