Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-434

GCC warnings for pointer conversions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • C++ 1.7.3
    • None
    • C++
    • None
    • Debian Linux x86_64
      gcc (Debian 5.2.1-22) 5.2.1 20151010

    Description

      The build process emits lots of warnings like this:

      /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;
      

      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:

      $ 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]
      

      Attachments

        Issue Links

          Activity

            People

              scantor Scott Cantor
              wferi Ferenc Wágner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: