From af9d91990641cc5cc34010b3eb2c0e827e2ec0b2 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 30 Jul 2016 17:24:17 +0200 Subject: unclutter: fix compiler warnings Signed-off-by: Max Krummenacher Acked-by: Stefan Agner --- .../unclutter/files/cross-compile.patch | 3 ++ .../unclutter/files/fix_include_path.patch | 26 +++++++++ .../files/fix_missing_int_declarators.patch | 61 ++++++++++++++++++++++ recipes-graphics/unclutter/unclutter_1.09.bb | 8 +-- 4 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 recipes-graphics/unclutter/files/fix_include_path.patch create mode 100644 recipes-graphics/unclutter/files/fix_missing_int_declarators.patch (limited to 'recipes-graphics') diff --git a/recipes-graphics/unclutter/files/cross-compile.patch b/recipes-graphics/unclutter/files/cross-compile.patch index 574f9cc..f1277f5 100644 --- a/recipes-graphics/unclutter/files/cross-compile.patch +++ b/recipes-graphics/unclutter/files/cross-compile.patch @@ -1,3 +1,6 @@ +Dont hardcode CC. Thus allow to use a cross-compiler + +Signed-off-by: Max Krummenacher --- unclutter-1.09/Makefile.orig 2007-02-05 23:52:40.000000000 +0100 +++ unclutter-1.09/Makefile 2013-05-14 19:08:13.612112758 +0200 @@ -1,7 +1,6 @@ diff --git a/recipes-graphics/unclutter/files/fix_include_path.patch b/recipes-graphics/unclutter/files/fix_include_path.patch new file mode 100644 index 0000000..618cee8 --- /dev/null +++ b/recipes-graphics/unclutter/files/fix_include_path.patch @@ -0,0 +1,26 @@ +Remove include path to /usr/include. +Fixes bitbake warning: +| WARNING: unclutter-1.09-r0 do_package_qa: QA Issue: unclutter: The compile log indicates that host include and/or library paths were used. +| Please check the log '/mnt/sdc2/oe-disk/oe-core_master/build/out-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/unclutter/1.09-r0/temp/log.do_compile' for more information. [compile-host-path] + +Signed-off-by: Max Krummenacher +diff -Naur unclutter-1.09.orig/Makefile unclutter-1.09/Makefile +--- unclutter-1.09.orig/Makefile 2016-07-30 16:43:56.730859141 +0200 ++++ unclutter-1.09/Makefile 2016-07-30 16:49:19.603890691 +0200 +@@ -10,7 +10,7 @@ + MFLAGS = -$(MAKEFLAGS) + INSTPGMFLAGS = -c -s + INSTMANFLAGS = -c +- TOP_INCLUDES = -I$(INCROOT) ++ TOP_INCLUDES = + CDEBUGFLAGS = -O + ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS) +@@ -21,7 +21,6 @@ + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + BINDIR = $(DESTDIR)/usr/bin/X11 +- INCROOT = $(DESTDIR)/usr/include + MANPATH = $(DESTDIR)/usr/catman/x11_man + MANSOURCEPATH = $(MANPATH)/man + MANDIR = $(MANSOURCEPATH)1 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 +--- 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 + #include + #include ++#include + #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 \n\ + -idle 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, diff --git a/recipes-graphics/unclutter/unclutter_1.09.bb b/recipes-graphics/unclutter/unclutter_1.09.bb index bacb599..7ff33f0 100644 --- a/recipes-graphics/unclutter/unclutter_1.09.bb +++ b/recipes-graphics/unclutter/unclutter_1.09.bb @@ -2,12 +2,14 @@ SUMMARY = "Hides the cursor after inactivity" LICENSE = "PD" DEPENDS = "virtual/xserver" -PR = "r0" S = "${WORKDIR}/unclutter-${PV}" -SRC_URI = "${SOURCEFORGE_MIRROR}/unclutter/unclutter-${PV}.tar.gz \ - file://cross-compile.patch \ +SRC_URI = " \ + ${SOURCEFORGE_MIRROR}/unclutter/unclutter-${PV}.tar.gz \ + file://cross-compile.patch \ + file://fix_include_path.patch \ + file://fix_missing_int_declarators.patch \ " LIC_FILES_CHKSUM = "file://README;md5=7c9b6681ac4b35194de7d5f3585702b6" SRC_URI[md5sum] = "8c4464367b2db1d15fe36a8752e917c8" -- cgit v1.2.3