diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-21 19:35:52 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-21 19:35:52 -0200 |
commit | d923fd3366de8e26a328f3aa89bd531dd4a6304d (patch) | |
tree | 2faff0b74400d19695018721b1a2d470d7f9ae81 | |
parent | 6f444b5d063452e7a8705c756269960e509241d8 (diff) |
Correct make distcheck and sparse warnings.
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/buttonmap.c | 1 | ||||
-rw-r--r-- | src/xinput.c | 4 |
5 files changed, 15 insertions, 4 deletions
@@ -17,3 +17,7 @@ depcomp install-sh missing xinput.1 +*~ +xinput-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index b04f7aa..8b89d31 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,6 @@ CLEANFILES=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 27788c4..8d96a73 100644 --- a/configure.ac +++ b/configure.ac @@ -6,11 +6,17 @@ AC_INIT(xinput,[1.4.0], [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(XINPUT, x11 xext [xi >= 1.2] [inputproto >= 1.5]) @@ -18,6 +24,7 @@ LIBS="$XINPUT_LIBS $LIBS" AC_CHECK_FUNC(XSetClientPointer,AC_DEFINE(HAVE_XI2,1,[XInput Version 2 Enabled])) AM_CONDITIONAL(HAVE_XI2, [test "x$ac_cv_func_XSetClientPointer" = "xyes"] ) +XINPUT_CFLAGS="$CWARNFLAGS $XINPUT_CFLAGS" AC_SUBST(XINPUT_CFLAGS) AC_SUBST(XINPUT_LIBS) AC_SUBST(HAVE_XI2) @@ -26,6 +33,7 @@ AC_SUBST(VERSION) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile diff --git a/src/buttonmap.c b/src/buttonmap.c index c3dc406..7fed927 100644 --- a/src/buttonmap.c +++ b/src/buttonmap.c @@ -69,7 +69,6 @@ get_button_map(Display *display, if (device) { int idx; unsigned char *map; - int min; map = (unsigned char *) malloc(sizeof(unsigned char) * nbuttons); diff --git a/src/xinput.c b/src/xinput.c index 1207f9d..466a814 100644 --- a/src/xinput.c +++ b/src/xinput.c @@ -131,7 +131,7 @@ static entry drivers[] = "<device> <property>", delete_prop }, - {0, 0, 0 + {NULL, NULL, NULL } }; @@ -167,7 +167,7 @@ find_device_info(Display *display, int num_devices; int len = strlen(name); Bool is_id = True; - XID id; + XID id = (XID)-1; for(loop=0; loop<len; loop++) { if (!isdigit(name[loop])) { |