summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2019-05-11 14:30:03 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2019-05-12 15:45:00 +0200
commite85f12dffee6eb1fc98864afa16b87376e175429 (patch)
treeb8887678716305274e7fd554b6c51104dbf17b01
parent895c668b49693e9a6584ba08664436fd43986830 (diff)
downloadlibxslt-e85f12dffee6eb1fc98864afa16b87376e175429.tar.gz
Compile with -Wextra
Also run Travis tests with -Werror.
-rw-r--r--.travis.yml4
-rw-r--r--configure.ac2
-rw-r--r--libxslt/variables.c8
3 files changed, 8 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 172d1e2f..f1e589eb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,12 +7,12 @@ matrix:
# TODO: Build and test Python bindings.
- compiler: gcc
env: CONFIG="--without-python"
- CFLAGS="-O2 -std=c89 -D_POSIX_C_SOURCE=200112L"
+ CFLAGS="-O2 -std=c89 -D_POSIX_C_SOURCE=200112L -Werror -Wno-error=array-bounds"
# clang with AddressSanitizer and UndefinedBehaviorSanitizer.
- compiler: clang
dist: trusty
env: CONFIG="--without-python"
- CFLAGS="-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=all"
+ CFLAGS="-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=all -Werror -Wno-error=cast-align"
UBSAN_OPTIONS=print_stacktrace=1
script:
- |
diff --git a/configure.ac b/configure.ac
index f932049c..501bb391 100644
--- a/configure.ac
+++ b/configure.ac
@@ -474,7 +474,7 @@ if test "${GCC}" != "yes" ; then
;;
esac
else
- CFLAGS="${CFLAGS} -Wall -Wformat=2 -Wmissing-format-attribute"
+ CFLAGS="${CFLAGS} -Wall -Wextra -Wformat=2 -Wmissing-format-attribute"
case "${host}" in
alpha*-*-linux* )
CFLAGS="${CFLAGS} -mieee"
diff --git a/libxslt/variables.c b/libxslt/variables.c
index 8f88e573..2982f092 100644
--- a/libxslt/variables.c
+++ b/libxslt/variables.c
@@ -205,7 +205,8 @@ xsltRegisterLocalRVT(xsltTransformContextPtr ctxt,
* This function is unsupported in newer releases of libxslt.
*/
int
-xsltExtensionInstructionResultFinalize(xsltTransformContextPtr ctxt)
+xsltExtensionInstructionResultFinalize(
+ xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED)
{
xmlGenericError(xmlGenericErrorContext,
"xsltExtensionInstructionResultFinalize is unsupported "
@@ -230,8 +231,9 @@ xsltExtensionInstructionResultFinalize(xsltTransformContextPtr ctxt)
* libxslt.
*/
int
-xsltExtensionInstructionResultRegister(xsltTransformContextPtr ctxt,
- xmlXPathObjectPtr obj)
+xsltExtensionInstructionResultRegister(
+ xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED,
+ xmlXPathObjectPtr obj ATTRIBUTE_UNUSED)
{
return(0);
}