backlight: fix for FreeBSD and pet a warning

Thu, 19 Sep 2019 21:05:00 +0200

author
David Demelier <markand@malikania.fr>
date
Thu, 19 Sep 2019 21:05:00 +0200
changeset 9
bd47bd0c977a
parent 8
23faf720d186
child 10
2b12d8bee90d

backlight: fix for FreeBSD and pet a warning

backlight.c file | annotate | diff | comparison | revisions
--- a/backlight.c	Tue Sep 17 22:01:13 2019 +0200
+++ b/backlight.c	Thu Sep 19 21:05:00 2019 +0200
@@ -23,6 +23,7 @@
 #include <string.h>
 
 enum action {
+	None,
 	Up,
 	Down
 };
@@ -102,13 +103,11 @@
 	return next;
 }
 
-#endif
-
 /* }}} */
 
 /* {{{ Support for Linux */
 
-#if defined(__linux__)
+#elif defined(__linux__)
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -214,7 +213,7 @@
 int
 main(int argc, char *argv[])
 {
-	int st, type;
+	int st, type = None;
 
 	if (argc < 2)
 		usage(argv[0]);

mercurial