History

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.

cancel committed 6 years ago

Commit 08e0da91 parent ab337701 file · +2 −2Browse files

Unified · Split

tui_main.c+2−2
@@ -1651,8 +1651,8 @@ static Usz view_to_scrolled_grid(Usz field_len, Usz visual_coord, · 1650 unmodified lines
16511651 return visual_coord;
16521652 }
16531653
1654−staticni void ged_mouse_event(Ged *a, Usz vis_y, Usz vis_x,
1655− mmask_t mouse_bstate) {
1654+ORCA_OK_IF_UNUSED staticni void ged_mouse_event(Ged *a, Usz vis_y, Usz vis_x,
1655+ mmask_t mouse_bstate) {
16561656 if (mouse_bstate & BUTTON1_RELEASED) {
16571657 // hard-disables tracking, but also disables further mouse stuff.
16581658 // mousemask() with our original parameters seems to work to get into the

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t