diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-03-30 12:38:47 -0700 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-03-30 12:38:47 -0700 |
commit | 95bbfb6023877ca25720f04203ef2aa2f691e995 (patch) | |
tree | 66fab38659c1b0a9cbc3d4ae85b6f5cf3ce79c44 /travis-autogen.sh | |
parent | 9a1bc8cafb904c20a869c74ad6d657686a1c4bb1 (diff) | |
download | libusb-95bbfb6023877ca25720f04203ef2aa2f691e995.tar.gz |
build: Enable additional build errors and warnings
Help catch more errors by enabling additional build errors and warnings.
Address some of the warnings seen with these new flags, including moving
the libusb_transfer structure back out of the usbi_transfer structure to
address 'warning: invalid use of structure with flexible array member'.
Apparently a structure ending with a flexible array member is not okay
with the compiler as the last member within another structure.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'travis-autogen.sh')
-rwxr-xr-x | travis-autogen.sh | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/travis-autogen.sh b/travis-autogen.sh index cdd8781..7acf941 100755 --- a/travis-autogen.sh +++ b/travis-autogen.sh @@ -1,39 +1,22 @@ #!/bin/bash -# Warnings enabled -CFLAGS="-Wall -Wextra" +CFLAGS="-O2" CFLAGS+=" -Wbad-function-cast" #CFLAGS+=" -Wcast-align" -CFLAGS+=" -Wchar-subscripts" -CFLAGS+=" -Wempty-body" -CFLAGS+=" -Wformat" CFLAGS+=" -Wformat-security" CFLAGS+=" -Winit-self" CFLAGS+=" -Winline" -CFLAGS+=" -Wmissing-declarations" CFLAGS+=" -Wmissing-include-dirs" -CFLAGS+=" -Wmissing-prototypes" CFLAGS+=" -Wnested-externs" CFLAGS+=" -Wold-style-definition" CFLAGS+=" -Wpointer-arith" CFLAGS+=" -Wredundant-decls" -CFLAGS+=" -Wshadow" -CFLAGS+=" -Wstrict-prototypes" CFLAGS+=" -Wswitch-enum" -CFLAGS+=" -Wundef" -CFLAGS+=" -Wuninitialized" -CFLAGS+=" -Wunused" -CFLAGS+=" -Wwrite-strings" # warnings disabled on purpose -CFLAGS+=" -Wno-unused-parameter" -CFLAGS+=" -Wno-unused-function" CFLAGS+=" -Wno-deprecated-declarations" -# should be removed and the code fixed -CFLAGS+=" -Wno-incompatible-pointer-types-discards-qualifiers" - export CFLAGS -./autogen.sh "$@" +exec ./autogen.sh "$@" |