[libxslt] Compile with -Wextra
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Compile with -Wextra
- Date: Sun, 12 May 2019 13:52:18 +0000 (UTC)
commit e85f12dffee6eb1fc98864afa16b87376e175429
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sat May 11 14:30:03 2019 +0200
Compile with -Wextra
Also run Travis tests with -Werror.
.travis.yml | 4 ++--
configure.ac | 2 +-
libxslt/variables.c | 8 +++++---
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]