]> mj.ucw.cz Git - checkmail.git/commitdiff
Make it compile without CONFIG_INOTIFY and clean it up a bit
authorMartin Mares <mj@ucw.cz>
Fri, 21 Jan 2022 20:58:45 +0000 (21:58 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 21 Jan 2022 20:58:45 +0000 (21:58 +0100)
cm.c

diff --git a/cm.c b/cm.c
index 01d683d9ec37dc4f979bc1187705b21d76a7691a..b55d7989080170470db441be853245803316fa0e 100644 (file)
--- 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 <sys/inotify.h>
 
+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)