From 45a6ada4178d3f025823f336dbac3887fa6867f2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 21 Jan 2022 21:58:45 +0100 Subject: [PATCH] Make it compile without CONFIG_INOTIFY and clean it up a bit --- cm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cm.c b/cm.c index 01d683d..b55d798 100644 --- a/cm.c +++ b/cm.c @@ -137,7 +137,6 @@ static char *osd_mbox_opt_separator=" "; static void redraw_line(int i); static void rethink_display(int notify); -static int inotify_fd; static bool inotify_active; static void inotify_cm_init(void); static void inotify_add_mbox(struct mbox * b); @@ -1724,10 +1723,13 @@ without_inotify_wait(int timeout) timeout *= 10; halfdelay((timeout > 255) ? 255 : timeout); } + #ifdef CONFIG_INOTIFY #include +static int inotify_fd; + static void inotify_cm_init(void) { @@ -1785,9 +1787,8 @@ inotify_add_mbox(struct mbox * b) } static void -inotify_delete_mbox(struct mbox * b) +inotify_delete_mbox(struct mbox *b UNUSED) { - (void)b; // TODO } @@ -1837,13 +1838,13 @@ inotify_wait(int timeout) #else static void -inotify_cm_init(void){} +inotify_cm_init(void) {} static void -inotify_add_mbox(struct mbox *){} +inotify_add_mbox(struct mbox *mbox UNUSED) {} static void -inotify_delete_mbox(struct mbox *){} +inotify_delete_mbox(struct mbox *mbox UNUSED) {} static bool inotify_wait(int timeout) -- 2.39.2