This prevents several compiler warnings such as the following:
wmifs.c:422:3: warning: null argument where non-null required (argument 1)
[-Wnonnull]
left_action = strdup(LEFT_ACTION);
^
---
wmifs/wmifs/wmifs.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/wmifs/wmifs/wmifs.c b/wmifs/wmifs/wmifs.c
index c9be457..9a3339b 100644
--- a/wmifs/wmifs/wmifs.c
+++ b/wmifs/wmifs/wmifs.c
@@ -223,10 +223,10 @@
#define stats_ptr stats.p.FIXME
#endif
-/* Fill in the hardcoded actions */
-#define LEFT_ACTION (NULL)
-#define MIDDLE_ACTION (NULL)
-#define RIGHT_ACTION (NULL)
+/* Fill in and uncomment the hardcoded actions */
+/* #define LEFT_ACTION (NULL) */
+/* #define MIDDLE_ACTION (NULL) */
+/* #define RIGHT_ACTION (NULL) */
/* Defines voor alle coordinate */
@@ -418,12 +418,15 @@ void wmifs_routine(int argc, char **argv)
}
}
- if (LEFT_ACTION)
- left_action = strdup(LEFT_ACTION);
- if (MIDDLE_ACTION)
- middle_action = strdup(MIDDLE_ACTION);
- if (RIGHT_ACTION)
- right_action = strdup(RIGHT_ACTION);
+#ifdef LEFT_ACTION
+ left_action = strdup(LEFT_ACTION);
+#endif
+#ifdef MIDDLE_ACTION
+ middle_action = strdup(MIDDLE_ACTION);
+#endif
+#ifdef RIGHT_ACTION
+ right_action = strdup(RIGHT_ACTION);
+#endif
/* Scan throught the .rc files */
parse_rcfile("/etc/wmifsrc", wmifs_keys);
--
1.9.1
--
To unsubscribe, send mail to [email protected].