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

DSIGReference is missing a header guard

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • C++ 2.0.0, C++ 2.0.1, C++ 2.0.2
    • C++ 2.0.3
    • C++
    • None

    Description

      The file under consideration:
      https://svn.apache.org/repos/asf/santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.hpp

      Reproduction steps:
      Compile a cpp file with DSIGReference.hpp included twice:

      #include <xsec/dsig/DSIGReference.hpp>
      #include <xsec/dsig/DSIGReference.hpp>
      

      Current behavior:
      The compiler fails due to redefinition of symbols:

      In file included from XXX.cpp:1:
      /usr/include/xsec/dsig/DSIGReference.hpp:71:19: error: redefinition of 'class DSIGReference'
      
       71 | class XSEC_EXPORT DSIGReference {
       | ^~~~~~~~~~~~~
      In file included from XXX.cpp:2:
      /usr/include/xsec/dsig/DSIGReference.hpp:71:19: note: previous definition of 'class DSIGReference'
       71 | class XSEC_EXPORT DSIGReference {
       | ^~~~~~~~~~~~~
      

      Expected behavior:
      Compiler succeeds.

      I'd be happy to fix that but I haven't found any guide for contributors.

      Attachments

        Activity

          People

            scantor Scott Cantor
            michal.kowalczyk MichaƂ Kowalczyk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: