[xmlsec/xmlsec-openssl-110: 3/9] change from ansi-C to C99 as default pedantic flag



commit d6bd7f7cb78b3cb9d524679d49a6c31f377bcf46
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Wed Jan 27 22:53:48 2016 -0800

    change from ansi-C to C99 as default pedantic flag

 configure.in  |   12 ++++++------
 src/xmldsig.c |    1 -
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/configure.in b/configure.in
index df7838c..48323ef 100644
--- a/configure.in
+++ b/configure.in
@@ -148,12 +148,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
        [[char *foo = __func__;]])],
        [ac_func_exists=yes],
        [ac_func_exists=no])
-if test "z$ac_function_exists" = "zyes" ; then
-       AC_MSG_RESULT(__FUNCTION__)
-       XMLSEC_DEFINES="$XMLSEC_DEFINES -D__XMLSEC_FUNCTION__='__extension__ __FUNCTION__'"
-elif test "z$ac_func_exists" = "zyes" ; then 
+if test "z$ac_func_exists" = "zyes" ; then 
        AC_MSG_RESULT(__func__)
        XMLSEC_DEFINES="$XMLSEC_DEFINES -D__XMLSEC_FUNCTION__=__func__"
+elif test "z$ac_function_exists" = "zyes" ; then
+    AC_MSG_RESULT(__FUNCTION__)
+    XMLSEC_DEFINES="$XMLSEC_DEFINES -D__XMLSEC_FUNCTION__=__FUNCTION__"
 else 
        AC_MSG_RESULT("no")
 fi
@@ -1502,8 +1502,8 @@ dnl ==========================================================================
 AC_MSG_CHECKING(for pedantic) 
 AC_ARG_ENABLE(pedantic,   [  --enable-pedantic       enable pedantic compilation flags (no)])
 if test "z$enable_pedantic" = "zyes" ; then
-    dnl CFLAGS="$CFLAGS -pedantic -Wall -ansi -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment 
-Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align 
-Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline 
-Wredundant-decls"
-    CFLAGS="$CFLAGS -O -pedantic -Wall -ansi -fno-inline -W -Wunused -Wimplicit -Wreturn-type -Wswitch 
-Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith 
-Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wnested-externs -Winline 
-Wredundant-decls"
+    dnl CFLAGS="$CFLAGS -pedantic -Wall -std=c99 -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment 
-Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align 
-Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 
-Wredundant-decls"
+    CFLAGS="$CFLAGS -O -pedantic -Wall -std=c99 -fno-inline -W -Wunused -Wimplicit -Wreturn-type -Wswitch 
-Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith 
-Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wredundant-decls"
     AC_MSG_RESULT(yes)
 else
     AC_MSG_RESULT(no)
diff --git a/src/xmldsig.c b/src/xmldsig.c
index 6ff2806..f6800e8 100644
--- a/src/xmldsig.c
+++ b/src/xmldsig.c
@@ -703,7 +703,6 @@ static int
 xmlSecDSigCtxProcessSignedInfoNode(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node, xmlNodePtr * 
firstReferenceNode) {
     xmlSecSize refNodesCount = 0;
     xmlNodePtr cur;
-    int ret;
 
     xmlSecAssert2(dsigCtx != NULL, -1);
     xmlSecAssert2(dsigCtx->status == xmlSecDSigStatusUnknown, -1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]