From f550dfbb347ec62ca59e86f79a9e4fe43417ab39 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 3 Jan 2024 16:37:15 -0800 Subject: Handle -Wmissing-prototypes warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xinput.c:277:6: warning: no previous prototype for ‘is_pointer’ [-Wmissing-prototypes] 277 | Bool is_pointer(int use) | ^~~~~~~~~~ xinput.c:282:6: warning: no previous prototype for ‘is_keyboard’ [-Wmissing-prototypes] 282 | Bool is_keyboard(int use) | ^~~~~~~~~~~ xinput.c:287:6: warning: no previous prototype for ‘device_matches’ [-Wmissing-prototypes] 287 | Bool device_matches(XIDeviceInfo *info, char *name) | ^~~~~~~~~~~~~~ test_xi2.c:254:1: warning: no previous prototype for ‘test_sync_grab’ [-Wmissing-prototypes] 254 | test_sync_grab(Display *display, Window win) Signed-off-by: Alan Coopersmith --- src/test_xi2.c | 3 ++- src/xinput.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test_xi2.c b/src/test_xi2.c index 5f97258..d3d0d64 100644 --- a/src/test_xi2.c +++ b/src/test_xi2.c @@ -250,7 +250,8 @@ static void print_propertyevent(Display *display, XIPropertyEvent* event) XFree(name); } -void + +static void test_sync_grab(Display *display, Window win) { int loop = 3; diff --git a/src/xinput.c b/src/xinput.c index 82cdb95..28aeb65 100644 --- a/src/xinput.c +++ b/src/xinput.c @@ -274,17 +274,17 @@ find_device_info(Display *display, } #if HAVE_XI2 -Bool is_pointer(int use) +static Bool is_pointer(int use) { return use == XIMasterPointer || use == XISlavePointer; } -Bool is_keyboard(int use) +static Bool is_keyboard(int use) { return use == XIMasterKeyboard || use == XISlaveKeyboard; } -Bool device_matches(XIDeviceInfo *info, char *name) +static Bool device_matches(XIDeviceInfo *info, char *name) { if (strcmp(info->name, name) == 0) { return True; -- cgit v1.2.3