summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2007-12-30 22:09:50 +0000
committerDaniel Drake <dsd@gentoo.org>2007-12-30 22:09:50 +0000
commitf4ed0b6a3e0a20555fdfc9e9b8be7e8a2c8ae192 (patch)
treeb12574407019ca52804e61f85a4e1426a68cec58
parentd3d671efe27491baf1d2ceadbfeeb4e7428d6f9a (diff)
downloadlibusb-f4ed0b6a3e0a20555fdfc9e9b8be7e8a2c8ae192.tar.gz
Compiler flags update
Also fix some warnings
-rw-r--r--configure.ac2
-rw-r--r--libfpusb/core.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 9829012..2f1efd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
-AM_CFLAGS="-Werror-implicit-function-declaration -Wimplicit-int -Wunreachable-code -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wnonnull -Wreturn-type -Wextra -Wshadow"
+AM_CFLAGS="-std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
AC_SUBST(AM_CFLAGS)
AC_CONFIG_FILES([fpusb.pc] [Makefile] [libfpusb/Makefile] [examples/Makefile])
diff --git a/libfpusb/core.c b/libfpusb/core.c
index 7342c2d..a2fa961 100644
--- a/libfpusb/core.c
+++ b/libfpusb/core.c
@@ -158,7 +158,7 @@ static int scan_busdir(const char *busnum)
return -1;
}
- while (entry = readdir(dir)) {
+ while ((entry = readdir(dir))) {
if (entry->d_name[0] == '.')
continue;
/* deliberately ignoring errors due to valid unplug race conditions */
@@ -180,7 +180,7 @@ API_EXPORTED int fpusb_find_devices(void)
return -1;
}
- while (entry = readdir(busses)) {
+ while ((entry = readdir(busses))) {
if (entry->d_name[0] == '.')
continue;
/* deliberately ignoring errors, valid race conditions exist