Define the versionsort overrides as inlines
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 28 Jul 2021 01:21:17 +0000 (11:21 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 28 Jul 2021 02:50:11 +0000 (12:50 +1000)
Squashes compiler warnings about unused functions given this header is
included in multiple files.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/libinput-versionsort.h

index 62fc31ae338bef19f999d32aecfff326a4247703..bb83f506064d9a2ba9af73e4d6a8b65248d7ee98 100644 (file)
@@ -29,7 +29,7 @@
 #include <dirent.h>
 
 #if !defined(HAVE_VERSIONSORT) || defined(TEST_VERSIONSORT)
-static int
+static inline int
 libinput_strverscmp(const char *l0, const char *r0)
 {
        const unsigned char *l = (const void *)l0;
@@ -65,13 +65,13 @@ libinput_strverscmp(const char *l0, const char *r0)
 /* Defined with libinput_ names for testing from platforms with native functions. */
 
 #ifndef HAVE_VERSIONSORT
-static int
+static inline int
 strverscmp(const char *l0, const char *r0)
 {
        return libinput_strverscmp(l0, r0);
 }
 
-static int
+static inline int
 versionsort(const struct dirent **a, const struct dirent **b)
 {
        return libinput_strverscmp((*a)->d_name, (*b)->d_name);