You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by sc...@apache.org on 2024/09/23 17:40:04 UTC
(xerces-c) 02/04: Add -Wctor-dtor-privacy warning suppress to Xlat generated code
This is an automated email from the ASF dual-hosted git repository.
scantor pushed a commit to branch xerces-3.3
in repository https://gitbox.apache.org/repos/asf/xerces-c.git
commit e6ebfc5afc74236084300d7533ab115522138e34
Author: William S Fulton <ws...@fultondesigns.co.uk>
AuthorDate: Sat Aug 17 09:12:29 2024 +0100
Add -Wctor-dtor-privacy warning suppress to Xlat generated code
Adds missing warning suppression that is currently in the committed
version of XMLExceptMsgs.hpp.
Also adds the warning suppression to:
XMLErrorCodes.hpp
XMLValidityCodes.hpp
XMLDOMMsg.hpp
---
tools/NLS/Xlat/Xlat.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/NLS/Xlat/Xlat.cpp b/tools/NLS/Xlat/Xlat.cpp
index 223e9962f..69d5df5f5 100644
--- a/tools/NLS/Xlat/Xlat.cpp
+++ b/tools/NLS/Xlat/Xlat.cpp
@@ -624,6 +624,11 @@ int Xlat_main(int argC, XMLCh** argV)
fwprintf(outHeader, L"#include <xercesc/util/XercesDefs.hpp>\n");
fwprintf(outHeader, L"#include <xercesc/dom/DOMError.hpp>\n\n");
fwprintf(outHeader, L"XERCES_CPP_NAMESPACE_BEGIN\n\n");
+ fwprintf(outHeader, L"// Ignore warning about private constructor\n");
+ fwprintf(outHeader, L"#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5))\n");
+ fwprintf(outHeader, L"# pragma GCC diagnostic push\n");
+ fwprintf(outHeader, L"# pragma GCC diagnostic ignored \"-Wctor-dtor-privacy\"\n");
+ fwprintf(outHeader, L"#endif\n\n");
// Now the message codes
fwprintf(outHeader, L"class %s\n{\npublic :\n enum Codes\n {\n", xmlStrToPrintable(errNameSpace) );
@@ -835,6 +840,9 @@ int Xlat_main(int argC, XMLCh** argV)
// And close out the class declaration, the namespace declaration and the header file
fwprintf(outHeader, L"};\n\n");
+ fwprintf(outHeader, L"#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5))\n");
+ fwprintf(outHeader, L"# pragma GCC diagnostic pop\n");
+ fwprintf(outHeader, L"#endif\n\n");
fwprintf(outHeader, L"XERCES_CPP_NAMESPACE_END\n\n");
fwprintf(outHeader, L"#endif\n\n");
fclose(outHeader);
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org