From d67733133b7a1062628e6c5e7512adf998026b6a Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 22 Jan 2009 14:53:41 -0200 Subject: Correct make distcheck and sparse warnings. --- .gitignore | 4 ++++ Makefile.am | 2 +- configure.ac | 8 ++++++++ utils.c | 5 ++++- utils.h | 2 -- xkbprint.c | 6 +++--- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 625b84d..d223713 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ stamp-h1 xkbprint xkbprint.1 *~ +*.o +xkbprint-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 2e48a7b..661b9c1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,6 +72,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 568f7ce..f9e620d 100644 --- a/configure.ac +++ b/configure.ac @@ -26,17 +26,25 @@ AC_INIT(xkbprint,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xo 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(XKBPRINT, xkbfile x11) +XKBPRINT_CFLAGS="$CWARNFLAGS $XKBPRINT_CFLAGS" AC_SUBST(XKBPRINT_CFLAGS) AC_SUBST(XKBPRINT_LIBS) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/utils.c b/utils.c index e6c6bab..e729af4 100644 --- a/utils.c +++ b/utils.c @@ -31,6 +31,9 @@ #include #include +unsigned int debugFlags; + + /***====================================================================***/ Opaque @@ -90,7 +93,7 @@ uFree(Opaque ptr) /***====================================================================***/ static FILE *entryFile= NULL; - int uEntryLevel; +static int uEntryLevel; Boolean uSetEntryFile(char *name) diff --git a/utils.h b/utils.h index 63a7681..b76a93b 100644 --- a/utils.h +++ b/utils.h @@ -173,9 +173,7 @@ extern char *uStringDup( #define DEBUG_VAR debugFlags #endif -#ifdef DEBUG_VAR_NOT_LOCAL extern -#endif unsigned int DEBUG_VAR; extern void uDebug( char *s, ... ); diff --git a/xkbprint.c b/xkbprint.c index 81e85e5..69f107d 100644 --- a/xkbprint.c +++ b/xkbprint.c @@ -80,8 +80,8 @@ static Display * outDpy; static Bool computeDflts= False; #endif static XKBPrintArgs args; - unsigned warningLevel= 5; - Bool synch; +static unsigned warningLevel= 5; +static Bool synch; /***====================================================================***/ @@ -448,7 +448,7 @@ register int i; else if (uStringEqual(inputFile,"-")) { /* Nothing */ } - else if (strchr(inputFile,':')==0) { + else if (strchr(inputFile,':')==NULL) { int len= strlen(inputFile); if ((len>4)&&(strcmp(&inputFile[len-4],".xkm")==0)) { /* Nothing */ -- cgit v1.2.3