Ansification and compile warning fixes. 79/9579/1
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Thu, 15 Jan 2009 18:22:28 +0000 (16:22 -0200)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 3 Sep 2013 04:25:49 +0000 (00:25 -0400)
  This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
make distcheck and all gcc 4.3 and sparse warnings.

Change-Id: Ic2ab8aa52e0ddd92c45e4fc072a00d09d55c76ed

.gitignore
Makefile.am
configure.ac
xwud.c

index 84a2306..5f98b68 100644 (file)
@@ -18,3 +18,7 @@ stamp-h1
 xwud
 xwud.1
 *~
+*.o
+xwud-*.tar.*
+ChangeLog
+tags
index 6eb6c7e..99e345f 100644 (file)
@@ -68,6 +68,6 @@ MAINTAINERCLEANFILES = ChangeLog
 .PHONY: ChangeLog
 
 ChangeLog:
-       (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+       $(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
index e773fa8..4ed0947 100644 (file)
@@ -26,17 +26,25 @@ AC_INIT(xwud,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
+
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
 AC_PROG_INSTALL
 
+XORG_CWARNFLAGS
+
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XWUD, x11)
+XWUD_CFLAGS="$CWARNFLAGS $XWUD_CFLAGS"
 AC_SUBST(XWUD_CFLAGS)
 AC_SUBST(XWUD_LIBS)
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile])
diff --git a/xwud.c b/xwud.c
index 1475f06..d2c463d 100644 (file)
--- a/xwud.c
+++ b/xwud.c
@@ -42,11 +42,11 @@ from The Open Group.
 #include <errno.h>
 #include <stdlib.h>
 
-Atom wm_protocols;
-Atom wm_delete_window;
-int split;
+static Atom wm_protocols;
+static Atom wm_delete_window;
+static int split;
 
-char *progname;
+static char *progname;
 
 static void usage(void);
 static Bool Read(char *ptr, int size, int nitems, FILE *stream);