ref: 08e0da99d867daec7bd286e05bdd2d3da269c2d8
parent: ab33770d4e862a2cde8bc430feb091aca2793847
author: cancel <cancel@cancel.fm>
date: Wed Oct 14 23:33:44 EDT 2020
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.
--- a/tui_main.c
+++ b/tui_main.c
@@ -1651,8 +1651,8 @@
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
--
⑨