diff options
author | Stephen M. Webb <stephen.webb@canonical.com> | 2011-11-02 09:27:23 -0400 |
---|---|---|
committer | Stephen M. Webb <stephen.webb@canonical.com> | 2011-11-02 09:27:23 -0400 |
commit | cdba43200d1d364c574b1b6202414d2f5667c871 (patch) | |
tree | a8cc8342e6bad88299c4280d8679db4400b6e79b | |
parent | 04b686828d95a0df46d9a621a7123aea82df8478 (diff) |
Cranked up all warnings and enabled -Werror
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/evemu.c | 5 | ||||
-rw-r--r-- | tools/evemu-record.c | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index a808a3d..0ccef4d 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,9 @@ if test "x$XMLTO" = "x" || test "x$ASCIIDOC" = "x"; then AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it]) fi +AC_SUBST(AM_CFLAGS, + "-Wall -Wextra -pedantic -Werror -std=gnu99 -D_GNU_SOURCE=1") + AC_CONFIG_FILES([Makefile src/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index aae0a7b..911d530 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,16 +4,16 @@ lib_LTLIBRARIES = libutouch-evemu.la libutouch_evemu_la_LDFLAGS = \ -version-info @LIB_VERSION@ \ - -D_GNU_SOURCE=1 \ -Wl,-z,defs -Wl,--as-needed \ -Wl,--version-script=$(version_script) +libutouch_evemu_la_CFLAGS = \ + -Wno-format + libutouch_evemu_la_SOURCES = \ evemu-impl.h \ evemu.c -AM_CFLAGS = $(CWARNFLAGS) - INCLUDES = -I$(top_srcdir)/include/ libutouch_evemuincludedir = $(includedir) diff --git a/src/evemu.c b/src/evemu.c index d481604..15cc384 100644 --- a/src/evemu.c +++ b/src/evemu.c @@ -40,7 +40,6 @@ * ****************************************************************************/ -#define _GNU_SOURCE #include "evemu-impl.h" #include <stdlib.h> #include <string.h> @@ -317,7 +316,7 @@ static void read_prop(struct evemu_device *dev, FILE *fp) static void read_mask(struct evemu_device *dev, FILE *fp) { unsigned int mask[8]; - int index, i; + unsigned int index, i; while (fscanf(fp, "B: %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", &index, mask + 0, mask + 1, mask + 2, mask + 3, mask + 4, mask + 5, mask + 6, mask + 7) > 0) { @@ -329,7 +328,7 @@ static void read_mask(struct evemu_device *dev, FILE *fp) static void read_abs(struct evemu_device *dev, FILE *fp) { struct input_absinfo abs; - int index; + unsigned int index; while (fscanf(fp, "A: %02x %d %d %d %d\n", &index, &abs.minimum, &abs.maximum, &abs.fuzz, &abs.flat) > 0) dev->abs[index] = abs; diff --git a/tools/evemu-record.c b/tools/evemu-record.c index 7cf1161..a046150 100644 --- a/tools/evemu-record.c +++ b/tools/evemu-record.c @@ -51,7 +51,7 @@ FILE *output; -static void handler (int sig) +static void handler (int sig __attribute__((unused))) { fflush(output); if (output != stdout) |