From b127cfb18e214b5188924a41f2f8d8ae38bf473f Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Tue, 27 Feb 2018 08:49:16 -0800 Subject: [PATCH 1/2] Fix Texas Instruments compiler warning Texas Instruments compiler produces this warning for unused template member functions: "pugixml.cpp", line 253: warning #179-D: function "pugi::impl::::auto_deleter::release [with T=pugi::impl::::xml_stream_chunk]" was declared but never referenced As far as I can tell, this is a compiler issue - these functions should not be instantiated in the first place; while it's possible to rework the code to work around this, the changes would be fragile. It seems best to just disable this warning - we've seen something similar on SNC (which appears to use the same frontend!..). Fixes #182. --- src/pugixml.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index b06eacb..a6930a1 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -76,6 +76,10 @@ # pragma diag_suppress=237 // controlling expression is constant #endif +#ifdef __TI_COMPILER_VERSION__ +# pragma diag_suppress 179 // function was declared but never referenced +#endif + // Inlining controls #if defined(_MSC_VER) && _MSC_VER >= 1300 # define PUGI__NO_INLINE __declspec(noinline) From b8d1d07ad8d6610091eb13394e990a74e9ed0135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brandl=2C=20Matth=C3=A4us=20=28MBR=29?= Date: Tue, 27 Feb 2018 22:27:15 +0100 Subject: [PATCH 2/2] Enables usage of override specifier for MSVC compilers (beginning with 17.0 which is the compiler of Visual Studio 2012) --- src/pugixml.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pugixml.hpp b/src/pugixml.hpp index afe0a4d..9277384 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -85,6 +85,8 @@ #ifndef PUGIXML_OVERRIDE # if __cplusplus >= 201103 # define PUGIXML_OVERRIDE override +# elif defined(_MSC_VER) && _MSC_VER >= 1700 +# define PUGIXML_OVERRIDE override # else # define PUGIXML_OVERRIDE # endif