You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Scott Cantor (JIRA)" <ji...@apache.org> on 2016/06/26 19:38:52 UTC
[jira] [Closed] (SANTUARIO-434) GCC warnings for pointer
conversions
[ https://issues.apache.org/jira/browse/SANTUARIO-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Cantor closed SANTUARIO-434.
----------------------------------
> 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
> Environment: Debian Linux x86_64
> gcc (Debian 5.2.1-22) 5.2.1 20151010
> Reporter: Ferenc Wágner
> Assignee: Scott Cantor
> Priority: Minor
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> 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)