From b46b48d0064f2ab5858832de4f936686127b4fff Mon Sep 17 00:00:00 2001 From: Jez Higgins Date: Mon, 11 Jan 2010 09:28:48 +0000 Subject: [PATCH] I think that's the last of the warnings --- examples/XSLT/mangle.cpp | 3 ++- include/XSLT/impl/xslt_sink.hpp | 6 +++--- tests/Utils/test_qname.hpp | 2 +- tests/XSLT/main.cpp | 3 ++- tests/XSLT/xslt_test.cpp | 11 ++++++----- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/examples/XSLT/mangle.cpp b/examples/XSLT/mangle.cpp index 3bdf085b..f34ed6c6 100755 --- a/examples/XSLT/mangle.cpp +++ b/examples/XSLT/mangle.cpp @@ -1,5 +1,6 @@ - +#ifdef _MSC_VER #pragma warning(disable : 4250) +#endif #include #include diff --git a/include/XSLT/impl/xslt_sink.hpp b/include/XSLT/impl/xslt_sink.hpp index 99539289..6c2edb16 100644 --- a/include/XSLT/impl/xslt_sink.hpp +++ b/include/XSLT/impl/xslt_sink.hpp @@ -375,7 +375,7 @@ protected: current().appendChild(document().createProcessingInstruction(target, data)); } // do_processing_instruction - void do_disableOutputEscaping(bool disable) { } + void do_disableOutputEscaping(bool /* disable */) { } bool want_namespace_declarations() const { return false; } @@ -394,8 +394,8 @@ protected: current_ = elem; } // do_start_element - void do_end_element(const std::string& qName, - const std::string& namespaceURI) + void do_end_element(const std::string& /* qName */, + const std::string& /* namespaceURI */) { outdent(); current_ = current_.getParentNode(); diff --git a/tests/Utils/test_qname.hpp b/tests/Utils/test_qname.hpp index ce04ac8c..778ddc17 100644 --- a/tests/Utils/test_qname.hpp +++ b/tests/Utils/test_qname.hpp @@ -106,7 +106,7 @@ public: assertTrue(SA::construct_from_utf8("t") == q.prefix()); } // testPrefix - static string_type uri_mapper(const string_type& prefix) + static string_type uri_mapper(const string_type& /* prefix */) { return SA::construct_from_utf8("http://test/"); } // uri_mapper diff --git a/tests/XSLT/main.cpp b/tests/XSLT/main.cpp index ba6492ac..c59d9bc4 100755 --- a/tests/XSLT/main.cpp +++ b/tests/XSLT/main.cpp @@ -1,5 +1,6 @@ - +#ifdef _MSC_VER #pragma warning(disable : 4250) +#endif #include #include diff --git a/tests/XSLT/xslt_test.cpp b/tests/XSLT/xslt_test.cpp index 0ad3a137..ca110c8e 100755 --- a/tests/XSLT/xslt_test.cpp +++ b/tests/XSLT/xslt_test.cpp @@ -1,5 +1,6 @@ - +#ifdef _MSC_VER #pragma warning(disable: 4250) +#endif #include "../CppUnit/framework/Test.h" @@ -407,7 +408,7 @@ protected: void stripWhitespace(Arabica::DOM::Node doc) { Arabica::XPath::NodeSet textNodes = selectNodes("//text()", doc); - for(int i = 0; i != textNodes.size(); ++i) + for(size_t i = 0; i != textNodes.size(); ++i) { Arabica::DOM::Node t = textNodes[i]; std::string text = t.getNodeValue(); @@ -505,7 +506,7 @@ protected: void stripWhitespace(Arabica::DOM::Node doc) { Arabica::XPath::NodeSet textNodes = selectNodes("//text()", doc); - for(int i = 0; i != textNodes.size(); ++i) + for(size_t i = 0; i != textNodes.size(); ++i) { Arabica::DOM::Node t = textNodes[i]; std::string text = t.getNodeValue(); @@ -540,7 +541,7 @@ public: std::cerr << "Loaded expected fails" << std::endl; Arabica::DOM::Document fail_doc = buildDOM(PATH_PREFIX + "arabica-expected-fails.xml"); Arabica::XPath::NodeSet failcases = selectNodes("/test-suite/test-case", fail_doc); - for(int i = 0; i != failcases.size(); ++i) + for(size_t i = 0; i != failcases.size(); ++i) { std::string name = selectString("@id", failcases[i]); std::string compiles = selectString("@compiles", failcases[i]); @@ -609,7 +610,7 @@ TestSuite* Loader::suite(const std::string& path, const std::string& catalog_fil Arabica::XPath::NodeSet tests = selectNodes("/test-suite/test-catalog/test-case[file-path='" + path + "']", catalog); std::cerr << "There are " << tests.size() << " " << path << " tests." << std::endl; - for(int i = 0; i != tests.size(); ++i) + for(size_t i = 0; i != tests.size(); ++i) { std::string operation = selectString("scenario/@operation", tests[i]); std::string name = selectString("@id", tests[i]);