Browse Source

Fix unused function warning with --no-mouse

ged_mouse_event() is never called when building with --no-mouse or when
defining FEAT_NOMOUSE. This could cause compilers to issue a warning.
This commit adds the ORCA_OK_IF_UNUSED decoration to ged_mouse_event(),
which should suppress the warning on most compilers. This intentionally
leaves the code compiled in. This is to avoid interleaving more ifdefs
than necessary into the code and making development and compile-time
errors more difficult to deal with.
master
cancel 5 years ago
parent
commit
08e0da99d8
  1. 4
      tui_main.c

4
tui_main.c

@ -1651,8 +1651,8 @@ static Usz view_to_scrolled_grid(Usz field_len, Usz visual_coord,
return visual_coord;
}
staticni void ged_mouse_event(Ged *a, Usz vis_y, Usz vis_x,
mmask_t mouse_bstate) {
ORCA_OK_IF_UNUSED staticni void ged_mouse_event(Ged *a, Usz vis_y, Usz vis_x,
mmask_t mouse_bstate) {
if (mouse_bstate & BUTTON1_RELEASED) {
// hard-disables tracking, but also disables further mouse stuff.
// mousemask() with our original parameters seems to work to get into the

Loading…
Cancel
Save