You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Michał Kowalczyk (Jira)" <ji...@apache.org> on 2021/04/22 10:19:00 UTC

[jira] [Created] (SANTUARIO-568) DSIGReference is missing a header guard

Michał Kowalczyk created SANTUARIO-568:
------------------------------------------

             Summary: DSIGReference is missing a header guard
                 Key: SANTUARIO-568
                 URL: https://issues.apache.org/jira/browse/SANTUARIO-568
             Project: Santuario
          Issue Type: Bug
          Components: C++
            Reporter: Michał Kowalczyk
            Assignee: Scott Cantor


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)