aboutsummaryrefslogtreecommitdiff
path: root/accessibility/unclutter
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-07-22 02:36:54 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-13 07:22:55 +0700
commitad4584717f6d6b017e43463176d10218cca5e054 (patch)
treeb9491cafcaa91746aa66faf0ab81c174912876e2 /accessibility/unclutter
parent27160cc5e86bf35ab3dc21e87bbe016d2968c8a7 (diff)
accessibility/unclutter: Fix gcc5 warnings.
Diffstat (limited to 'accessibility/unclutter')
-rw-r--r--accessibility/unclutter/fixwarnings.diff68
-rw-r--r--accessibility/unclutter/unclutter.SlackBuild8
2 files changed, 74 insertions, 2 deletions
diff --git a/accessibility/unclutter/fixwarnings.diff b/accessibility/unclutter/fixwarnings.diff
new file mode 100644
index 0000000000000..aa79fe9fa46ed
--- /dev/null
+++ b/accessibility/unclutter/fixwarnings.diff
@@ -0,0 +1,68 @@
+diff -Naur unclutter-1.09.orig/unclutter.c unclutter-1.09/unclutter.c
+--- unclutter-1.09.orig/unclutter.c 2007-02-05 18:13:12.000000000 -0500
++++ unclutter-1.09/unclutter.c 2016-07-22 02:27:29.013435877 -0400
+@@ -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;{
++void pexit(str)char *str;{
+ fprintf(stderr,"%s: %s\n",progname,str);
+ exit(1);
+ }
+-usage(){
++void usage(){
+ 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,7 @@
+ 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 -Naur unclutter-1.09.orig/vroot.h unclutter-1.09/vroot.h
+--- unclutter-1.09.orig/vroot.h 2007-02-05 17:52:40.000000000 -0500
++++ unclutter-1.09/vroot.h 2016-07-22 02:30:08.431426449 -0400
+@@ -40,6 +40,7 @@
+ static Window
+ VirtualRootWindow(dpy, screen)
+ Display *dpy;
++int screen;
+ {
+ static Display *save_dpy = (Display *)0;
+ static int save_screen = -1;
diff --git a/accessibility/unclutter/unclutter.SlackBuild b/accessibility/unclutter/unclutter.SlackBuild
index 02f76abb7235a..a02f5712e1091 100644
--- a/accessibility/unclutter/unclutter.SlackBuild
+++ b/accessibility/unclutter/unclutter.SlackBuild
@@ -8,7 +8,7 @@
PRGNAM=unclutter
VERSION=${VERSION:-1.09}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -53,8 +53,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix a few warnings that look like they might actually cause problems.
+# The source still uses K&R declarations, but ANSIfying it is more work
+# than I care to do for no benefit.
+patch -p1 < $CWD/fixwarnings.diff
+
xmkmf -a
-#make CDEBUGFLAGS="$SLKCFLAGS -fno-strength-reduce -fno-strict-aliasing"
make CDEBUGFLAGS="$SLKCFLAGS"
# manual install since "make install" fails to install the man page