You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Ferenc Wágner (JIRA)" <ji...@apache.org> on 2015/11/26 17:39:11 UTC

[jira] [Created] (SANTUARIO-434) GCC warnings for pointer conversions

Ferenc Wágner created SANTUARIO-434:
---------------------------------------

             Summary: GCC warnings for pointer conversions
                 Key: SANTUARIO-434
                 URL: https://issues.apache.org/jira/browse/SANTUARIO-434
             Project: Santuario
          Issue Type: Bug
          Components: C++
    Affects Versions: C++ 1.7.3, C++ 1.7.4
         Environment: Debian Linux x86_64
gcc (Debian 5.2.1-22) 5.2.1 20151010
            Reporter: Ferenc Wágner
            Assignee: Scott Cantor
            Priority: Minor


The build process emits lots of warnings like this:
{noformat}
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I../xsec/framework  -I..
 -D_FORTIFY_SOURCE=2   -Wall -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -O2
 -DNDEBUG -pthread -DXSEC_LIBRARY_BUILD -c -o XSECC14n20010315.lo `test -f 'canon/XSECC14n20010315.cpp'
 || echo './'`canon/XSECC14n20010315.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../xsec/framework -I.. -D_FORTIFY_SOURCE=2 -Wall -g -
O2 -fstack-protector-strong -Wformat -Werror=format-security -O2 -DNDEBUG -pthread -DXSEC_LIBRARY_BUILD
 -c canon/XSECC14n20010315.cpp  -fPIC -DPIC -o .libs/XSECC14n20010315.o
In file included from ../xsec/enc/XSECCryptoProvider.hpp:42:0,
                 from ../xsec/utils/XSECPlatformUtils.hpp:39,
                 from ../xsec/utils/XSECDOMUtils.hpp:36,
                 from canon/XSECC14n20010315.cpp:36:
../xsec/enc/XSECCryptoSymmetricKey.hpp:188:52: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null]
                              unsigned int taglen = NULL) = 0;
{noformat}
The reason is that {{-Wconversion-null}} is enabled by default in newer gcc versions. The solution is probably replacing the offending NULLs with 0s. The affected places in the 1.7.3 code base:
{noformat}
$ fgrep conversion-null xml-security-c_1.7.3-1_amd64.build | sort -u
tools/checksig/InteropResolver.cpp:648:9: warning: converting 'false' to pointer type 'XSECCryptoKey*' [-Wconversion-null]
transformers/TXFMCipher.cpp:63:106: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null]
xenc/impl/XENCAlgorithmHandlerDefault.cpp:252:59: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null]
xenc/impl/XENCAlgorithmHandlerDefault.cpp:407:72: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null]
xenc/impl/XENCAlgorithmHandlerDefault.cpp:425:23: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null]
../xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp:154:52: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null]
../xsec/enc/XSECCryptoSymmetricKey.hpp:188:52: warning: converting to non-pointer type 'unsigned int' from NULL [-Wconversion-null]
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)