summaryrefslogtreecommitdiff
path: root/recipes-graphics/unclutter/files/fix_missing_int_declarators.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/unclutter/files/fix_missing_int_declarators.patch')
-rw-r--r--recipes-graphics/unclutter/files/fix_missing_int_declarators.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-graphics/unclutter/files/fix_missing_int_declarators.patch b/recipes-graphics/unclutter/files/fix_missing_int_declarators.patch
new file mode 100644
index 0000000..f2acc6a
--- /dev/null
+++ b/recipes-graphics/unclutter/files/fix_missing_int_declarators.patch
@@ -0,0 +1,61 @@
+Modern C compiler warn about the usage of declaring variables with out type
+which then default to int.
+
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+--- unclutter-1.09.orig/unclutter.c 2007-02-06 00:13:12.000000000 +0100
++++ unclutter-1.09/unclutter.c 2016-07-30 16:44:37.462489217 +0200
+@@ -37,14 +37,15 @@
+ #include <X11/Xutil.h>
+ #include <X11/Xproto.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "vroot.h"
+
+ char *progname;
+-pexit(str)char *str;{
++int pexit(str)char *str;{
+ fprintf(stderr,"%s: %s\n",progname,str);
+ exit(1);
+ }
+-usage(){
++void usage(void){
+ pexit("usage:\n\
+ -display <display>\n\
+ -idle <seconds> time between polls to detect idleness.\n\
+@@ -87,7 +88,7 @@
+ * return true if window has a wm_name and the start of it matches
+ * one of the given names to avoid
+ */
+-nameinlist(display,window)
++int nameinlist(display,window)
+ Display *display;
+ Window window;
+ {
+@@ -109,7 +110,7 @@
+ * return true if window has a wm_name and one of the given names to avoid
+ * matches anywhere in that string
+ */
+-matchinlist(display,window)
++int matchinlist(display,window)
+ Display *display;
+ Window window;
+ {
+@@ -131,7 +132,7 @@
+ /*
+ * create a small 1x1 cursor with all pixels masked out on the given screen.
+ */
+-createnullcursor(display,root)
++Cursor createnullcursor(display,root)
+ Display *display;
+ Window root;
+ {
+@@ -155,7 +156,8 @@
+ return cursor;
+ }
+
+-main(argc,argv)char **argv;{
++int main(argc,argv)
++int argc; char **argv;{
+ Display *display;
+ int screen,oldx = -99,oldy = -99,numscreens;
+ int doroot = 0, jitter = 0, idletime = 5, usegrabmethod = 0, waitagain = 0,