Add preprocessor macro maybe_unused

Define a preprocessor macro maybe_unused and add
it where needed to remove unused parameter build
warnings.

Signed-off-by: Geoff Levand <geoff@infradead.org>
diff --git a/libtwin/twin_hull.c b/libtwin/twin_hull.c
index 8bd974f..b93069d 100644
--- a/libtwin/twin_hull.c
+++ b/libtwin/twin_hull.c
@@ -156,7 +156,8 @@
 }
 
 static int
-_twin_hull_prev_valid (twin_hull_t *hull, int num_hull, int index)
+_twin_hull_prev_valid (twin_hull_t *hull, int maybe_unused num_hull,
+		       int index)
 {
     do {
 	/* hull[0] is always valid, so don't test and wraparound */
diff --git a/libtwin/twin_linux_js.c b/libtwin/twin_linux_js.c
index 3108cb8..12e011a 100644
--- a/libtwin/twin_linux_js.c
+++ b/libtwin/twin_linux_js.c
@@ -31,6 +31,7 @@
 #include <linux/joystick.h>
 
 #include "twin.h"
+#include "twinint.h"
 #include "twin_linux_js.h"
 
 #define DEBUG(fmt...)	printf(fmt)
@@ -40,8 +41,9 @@
 	twin_screen_t *screen;
 };
 
-static twin_bool_t twin_linux_js_events(int file, twin_file_op_t ops,
-					   void *closure)
+static twin_bool_t twin_linux_js_events(int maybe_unused file,
+					twin_file_op_t maybe_unused ops,
+					void *closure)
 {
 	struct twin_js_dev *js = closure;
 	struct js_event js_event;
diff --git a/libtwin/twin_linux_mouse.c b/libtwin/twin_linux_mouse.c
index 085cb9a..d617c85 100644
--- a/libtwin/twin_linux_mouse.c
+++ b/libtwin/twin_linux_mouse.c
@@ -29,6 +29,7 @@
 #include <fcntl.h>
 #include <math.h>
 
+#include "twinint.h"
 #include "twin_linux_mouse.h"
 
 #define QUADRATIC_ACCELERATION		1
@@ -82,7 +83,8 @@
 	*dy = twin_fixed_to_int(twin_fixed_mul(accel, twin_int_to_fixed(*dy)));
 }
 
-static twin_bool_t twin_linux_mouse_events(int file, twin_file_op_t ops,
+static twin_bool_t twin_linux_mouse_events(int file,
+					   twin_file_op_t maybe_unused ops,
 					   void *closure)
 {
 	twin_linux_mouse_t *tm = closure;
diff --git a/libtwin/twin_screen.c b/libtwin/twin_screen.c
index 26fddee..b34020f 100644
--- a/libtwin/twin_screen.c
+++ b/libtwin/twin_screen.c
@@ -141,7 +141,8 @@
 }
 
 static void
-twin_screen_span_pixmap(twin_screen_t *screen, twin_argb32_t *span,
+twin_screen_span_pixmap(twin_screen_t maybe_unused *screen,
+			twin_argb32_t *span,
 			twin_pixmap_t *p, twin_coord_t y,
 			twin_coord_t left, twin_coord_t right,
 			twin_src_op op16, twin_src_op op32)
diff --git a/libtwin/twin_x11.c b/libtwin/twin_x11.c
index ed3bfdc..193c52d 100644
--- a/libtwin/twin_x11.c
+++ b/libtwin/twin_x11.c
@@ -80,9 +80,9 @@
 }
 
 static twin_bool_t
-twin_x11_read_events (int		file,
-		      twin_file_op_t	ops,
-		      void		*closure)
+twin_x11_read_events (int maybe_unused file,
+		      twin_file_op_t maybe_unused ops,
+		      void *closure)
 {
     twin_x11_t		    *tx = closure;
 
diff --git a/libtwin/twinint.h b/libtwin/twinint.h
index a54d244..37b1704 100644
--- a/libtwin/twinint.h
+++ b/libtwin/twinint.h
@@ -26,6 +26,8 @@
 #include "twin_def.h"
 #include <string.h>
 
+#define maybe_unused __attribute__((unused))
+
 /*
  * Post-transformed points are stored in 12.4 fixed point
  * values