diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-15 16:15:23 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-15 16:15:23 -0200 |
commit | 1326fcb6afe5a62b675bf99826f7e628c66237b4 (patch) | |
tree | 0c98b3b707762f502de9e4fd951997b2e88ea3f6 | |
parent | 958114e42396b669e28ba484260ccb5aaf1529a0 (diff) |
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
make distcheck and most gcc 4.3 and sparse warnings.
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | xsetpointer.c | 4 |
4 files changed, 14 insertions, 4 deletions
@@ -18,3 +18,7 @@ stamp-h1 xsetpointer xsetpointer.1 *~ +*.o +xsetpointer-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 24a33f8..85da618 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,7 @@ CLEANFILES = $(appman_DATA) ChangeLog .PHONY: ChangeLog ChangeLog: - GIT_DIR=$(srcdir)/.git git-log > ChangeLog + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index ec41f32..3e38ada 100644 --- a/configure.ac +++ b/configure.ac @@ -26,17 +26,25 @@ AC_INIT(xsetpointer,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product 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(XSETPOINTER, xi x11 [inputproto >= 1.4]) +XSETPOINTER_CFLAGS="$CWARNFLAGS $XSETPOINTER_CFLAGS" AC_SUBST(XSETPOINTER_CFLAGS) AC_SUBST(XSETPOINTER_LIBS) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/xsetpointer.c b/xsetpointer.c index ce689dc..b85bcf6 100644 --- a/xsetpointer.c +++ b/xsetpointer.c @@ -30,8 +30,6 @@ #include <X11/Xproto.h> #include <X11/extensions/XInput.h> -int event_type; - static int StrCaseCmp(char *s1, char *s2) { @@ -115,7 +113,7 @@ main(int argc, char * argv[]) for(loop=0; loop<num_devices; loop++) { if (list) { - printf("%d: \"%s\" [", devices[loop].id, devices[loop].name ? devices[loop].name : "<noname>"); + printf("%d: \"%s\" [", (int)devices[loop].id, devices[loop].name ? devices[loop].name : "<noname>"); switch(devices[loop].use) { case IsXPointer: printf("XPointer]\n"); |