From 7d42ea90bc9494f248d5fc5ed4c0ae9c90e6e6ca Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Wed, 21 Jan 2009 15:44:01 -0200 Subject: Correct make distcheck and some sparse/gcc warnings. Most remaining warnings are due to a macro that checks if it's argument is not NULL, but arguments are strings in the stack. --- .gitignore | 4 ++++ Makefile.am | 6 +++--- configure.ac | 14 +++++++++++--- xfindproxy.c | 8 ++++---- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 222ddc1..fdbda24 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ stamp-h1 xfindproxy xfindproxy.1 *~ +*.o +xfindproxy-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 29db26c..473a5ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,8 +21,8 @@ bin_PROGRAMS = xfindproxy -xfindproxy_CFLAGS = $(DEP_CFLAGS) -xfindproxy_LDADD = $(DEP_LIBS) +AM_CFLAGS = $(XFINDPROXY_CFLAGS) +xfindproxy_LDADD = $(XFINDPROXY_LIBS) xfindproxy_SOURCES = \ xfindproxy.c \ @@ -69,6 +69,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 diff --git a/configure.ac b/configure.ac index cb0946f..8a79589 100644 --- a/configure.ac +++ b/configure.ac @@ -26,17 +26,25 @@ AC_INIT(xfindproxy,[1.0.1], [xorg@freedesktop.org],xfindproxy) 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(DEP, x11 ice xt xproxymngproto) -AC_SUBST(DEP_CFLAGS) -AC_SUBST(DEP_LIBS) +PKG_CHECK_MODULES(XFINDPROXY, x11 ice xt xproxymngproto) +XFINDPROXY_CFLAGS="$CWARNFLAGS $XFINDPROXY_CFLAGS" +AC_SUBST(XFINDPROXY_CFLAGS) +AC_SUBST(XFINDPROXY_LIBS) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/xfindproxy.c b/xfindproxy.c index aa2385f..bb144c2 100644 --- a/xfindproxy.c +++ b/xfindproxy.c @@ -54,13 +54,13 @@ static void _XtIceWatchProc(IceConn ice_conn, IcePointer client_data, Bool opening, IcePointer *watch_data); static Status InitWatchProcs(XtAppContext appContext); -int PMopcode; +static int PMopcode; -int PMversionCount = 1; -IcePoVersionRec PMversions[] = +static int PMversionCount = 1; +static IcePoVersionRec PMversions[] = {{PM_MAJOR_VERSION, PM_MINOR_VERSION, PMprocessMessages}}; -XtAppContext appContext; +static XtAppContext appContext; typedef struct { int status; -- cgit v1.2.3