From b051c037d35ff87e215d4bafa056732a5072aa55 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Wed, 25 Feb 2015 00:32:46 +0000 Subject: RISC OS: squash warnings from GCC 4.7 --- riscos/gui.c | 2 +- riscos/window.c | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) (limited to 'riscos') diff --git a/riscos/gui.c b/riscos/gui.c index 7742008dd..3fd113c93 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -438,7 +438,7 @@ static void ro_gui_signal(int sig) #else /* Save WimpSlot and UnixLib managed DAs when UnixEnv$coredump * defines a coredump directory. */ - _kernel_oserror *err = __unixlib_write_coredump (NULL); + const _kernel_oserror *err = __unixlib_write_coredump (NULL); if (err != NULL) LOG(("Coredump failed: %s", err->errmess)); #endif diff --git a/riscos/window.c b/riscos/window.c index f6ebf14d4..6a2ae4467 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -4878,9 +4878,10 @@ browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons, /* Need to consider what we have and decide whether to fire * triple click instead */ - switch (state) { - case BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_CLICK_1: - case BROWSER_MOUSE_PRESS_2 | BROWSER_MOUSE_CLICK_2: + if ((state == (BROWSER_MOUSE_PRESS_1 | + BROWSER_MOUSE_CLICK_1)) || + (state == (BROWSER_MOUSE_PRESS_2 | + BROWSER_MOUSE_CLICK_2))) { /* WIMP told us single click, but maybe we want to call * it a triple click */ @@ -4899,12 +4900,12 @@ browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons, /* Single click */ last_click.type = CLICK_SINGLE; } - break; - - case BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_CLICK_1 | - BROWSER_MOUSE_DOUBLE_CLICK: - case BROWSER_MOUSE_PRESS_2 | BROWSER_MOUSE_CLICK_2 | - BROWSER_MOUSE_DOUBLE_CLICK: + } else if ((state == (BROWSER_MOUSE_PRESS_1 | + BROWSER_MOUSE_CLICK_1 | + BROWSER_MOUSE_DOUBLE_CLICK)) || + (state == (BROWSER_MOUSE_PRESS_2 | + BROWSER_MOUSE_CLICK_2 | + BROWSER_MOUSE_DOUBLE_CLICK))) { /* Wimp told us double click, but we may want to * call it single click */ @@ -4915,11 +4916,8 @@ browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons, last_click.type = CLICK_DOUBLE; last_click.time = wallclock(); } - break; - - default: + } else { last_click.type = CLICK_SINGLE; - break; } break; } -- cgit v1.2.3