From 2e825787671020f3fb6f54017500241a61f4b344 Mon Sep 17 00:00:00 2001 From: Jez Higgins Date: Sun, 10 Jan 2010 21:25:35 +0000 Subject: [PATCH] more warnings silenced --- .../handler/xslt_apply_imports_handler.hpp | 12 +++---- .../handler/xslt_apply_templates_handler.hpp | 12 +++---- .../impl/handler/xslt_attribute_handler.hpp | 10 +++--- .../handler/xslt_call_template_handler.hpp | 12 +++---- .../XSLT/impl/handler/xslt_choose_handler.hpp | 34 ++++++++++--------- .../impl/handler/xslt_comment_handler.hpp | 6 ++-- .../XSLT/impl/handler/xslt_copy_handler.hpp | 22 ++++++------ .../XSLT/impl/handler/xslt_create_handler.hpp | 8 ++--- .../impl/handler/xslt_element_handler.hpp | 12 +++---- .../XSLT/impl/xslt_compilation_context.hpp | 8 ++--- 10 files changed, 69 insertions(+), 67 deletions(-) diff --git a/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp b/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp index 6ca1eaaf..155cc2d9 100644 --- a/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp +++ b/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp @@ -21,9 +21,9 @@ public: { } // ~ApplyImportsHandler - virtual void startElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName, + virtual void startElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */, const SAX::Attributes& atts) { if(applyImports_ == 0) @@ -37,9 +37,9 @@ public: throw SAX::SAXException("xsl:apply-imports element must be empty"); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { context_.parentContainer().add_item(applyImports_); context_.pop(); diff --git a/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp b/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp index bbf5db49..5a7bfb63 100644 --- a/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp +++ b/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp @@ -26,9 +26,9 @@ public: { if(applyTemplates_ == 0) { - static const ValueRule rules[] = { { "select", false, 0 }, - { "mode", false, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "select", false, 0, 0 }, + { "mode", false, 0, 0 }, + { 0, false, 0, 0} }; std::map attrs = gatherAttributes(qName, atts, rules); const std::string& select = attrs["select"]; @@ -73,9 +73,9 @@ public: throw SAX::SAXException("xsl:apply-templates can only contain xsl:sort and xsl:with-param elements."); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { context_.parentContainer().add_item(applyTemplates_); context_.pop(); diff --git a/include/XSLT/impl/handler/xslt_attribute_handler.hpp b/include/XSLT/impl/handler/xslt_attribute_handler.hpp index 179e44d4..59f92e5b 100644 --- a/include/XSLT/impl/handler/xslt_attribute_handler.hpp +++ b/include/XSLT/impl/handler/xslt_attribute_handler.hpp @@ -18,14 +18,14 @@ public: } // AttributeHandler protected: - virtual Attribute* createContainer(const std::string& namespaceURI, - const std::string& localName, + virtual Attribute* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { - static const ValueRule rules[] = { { "name", true, 0 }, - { "namespace", false, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "name", true, 0, 0 }, + { "namespace", false, 0, 0 }, + { 0, false, 0, 0 } }; std::map attrs = gatherAttributes(qName, atts, rules); diff --git a/include/XSLT/impl/handler/xslt_call_template_handler.hpp b/include/XSLT/impl/handler/xslt_call_template_handler.hpp index cd3a5244..0fb68b66 100644 --- a/include/XSLT/impl/handler/xslt_call_template_handler.hpp +++ b/include/XSLT/impl/handler/xslt_call_template_handler.hpp @@ -25,8 +25,8 @@ public: { if(callTemplate_ == 0) { - static const ValueRule rules[] = { { "name", true, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "name", true, 0, 0 }, + { 0, false, 0, 0 } }; std::map attrs = gatherAttributes(qName, atts, rules); @@ -50,15 +50,15 @@ public: throw SAX::SAXException("xsl:apply-templates can only contain xsl:sort and xsl:with-param elements."); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { context_.parentContainer().add_item(callTemplate_); context_.pop(); } // endElement - virtual void characters(const std::string& ch) + virtual void characters(const std::string& /* ch */) { } // characters diff --git a/include/XSLT/impl/handler/xslt_choose_handler.hpp b/include/XSLT/impl/handler/xslt_choose_handler.hpp index 3bfaa819..bde0cc2b 100644 --- a/include/XSLT/impl/handler/xslt_choose_handler.hpp +++ b/include/XSLT/impl/handler/xslt_choose_handler.hpp @@ -18,19 +18,21 @@ public: { } // WhenHandler - virtual When* createContainer(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName, - const SAX::Attributes& atts) + virtual When* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& qName, + const SAX::Attributes& atts) { - static const ValueRule rules[] = { { "test", true, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "test", true, 0. 0 }, + { 0, false, 0, 0 } }; std::string test = gatherAttributes(qName, atts, rules)["test"]; return new When(ItemContainerHandler::context().xpath_expression(test)); } // startElement - virtual void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { choose_->add_when(ItemContainerHandler::container()); context().pop(); @@ -50,9 +52,9 @@ public: { } // OtherwiseHandler - virtual Otherwise* createContainer(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName, + virtual Otherwise* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */, const SAX::Attributes& atts) { if(atts.getLength()) @@ -61,9 +63,9 @@ public: return new Otherwise(); } // createContainer - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { choose_->set_otherwise(container()); context().pop(); @@ -132,9 +134,9 @@ public: throw SAX::SAXException("xsl:choose can not contain " + qName + ". Only xsl:when and xsl:otherwise are allowed"); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { if(!seenWhere_) throw SAX::SAXException("xsl:choose must contain at least one xsl:where element"); diff --git a/include/XSLT/impl/handler/xslt_comment_handler.hpp b/include/XSLT/impl/handler/xslt_comment_handler.hpp index 9701d529..9f8e4085 100644 --- a/include/XSLT/impl/handler/xslt_comment_handler.hpp +++ b/include/XSLT/impl/handler/xslt_comment_handler.hpp @@ -17,9 +17,9 @@ public: { } // CommentHandler - virtual Comment* createContainer(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName, + virtual Comment* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */, const SAX::Attributes& atts) { if(atts.getLength() != 0) diff --git a/include/XSLT/impl/handler/xslt_copy_handler.hpp b/include/XSLT/impl/handler/xslt_copy_handler.hpp index 45a1ab51..92df2846 100644 --- a/include/XSLT/impl/handler/xslt_copy_handler.hpp +++ b/include/XSLT/impl/handler/xslt_copy_handler.hpp @@ -16,13 +16,13 @@ public: { } // CopyHandler - virtual Copy* createContainer(const std::string& namespaceURI, - const std::string& localName, + virtual Copy* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { - static const ValueRule rules[] = { { "use-attribute-sets", false, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "use-attribute-sets", false, 0, 0 }, + { 0, false, 0, 0 } }; std::string sets = gatherAttributes(qName, atts, rules)["use-attribute-sets"]; return new Copy(sets); @@ -38,15 +38,15 @@ public: { } // CopyOfHandler - virtual void startElement(const std::string& namespaceURI, - const std::string& localName, + virtual void startElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { if(copyOf_ == 0) { - static const ValueRule rules[] = { { "select", true, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "select", true, 0, 0 }, + { 0, false, 0, 0 } }; std::string select = gatherAttributes(qName, atts, rules)["select"]; copyOf_ = new CopyOf(context_.xpath_expression(select)); @@ -57,9 +57,9 @@ public: throw SAX::SAXException(qName + " can not contain elements"); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { context_.parentContainer().add_item(copyOf_); context_.pop(); diff --git a/include/XSLT/impl/handler/xslt_create_handler.hpp b/include/XSLT/impl/handler/xslt_create_handler.hpp index ac51ba18..6d9e67c2 100644 --- a/include/XSLT/impl/handler/xslt_create_handler.hpp +++ b/include/XSLT/impl/handler/xslt_create_handler.hpp @@ -23,12 +23,12 @@ SAX::DefaultHandler* CreateHandler(CompilationContext& context) class NotImplementedYetHandler : public SAX::DefaultHandler { public: - NotImplementedYetHandler(CompilationContext& context) { } + NotImplementedYetHandler(CompilationContext& /* context */) { } - virtual void startElement(const std::string& namespaceURI, - const std::string& localName, + virtual void startElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& /* atts */) { throw SAX::SAXException("Haven't implemented " + qName + " yet"); } // startElement diff --git a/include/XSLT/impl/handler/xslt_element_handler.hpp b/include/XSLT/impl/handler/xslt_element_handler.hpp index d9acd28f..b5b1b5d6 100644 --- a/include/XSLT/impl/handler/xslt_element_handler.hpp +++ b/include/XSLT/impl/handler/xslt_element_handler.hpp @@ -18,15 +18,15 @@ public: } // ElementHandler protected: - virtual Element* createContainer(const std::string& namespaceURI, - const std::string& localName, + virtual Element* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { - static const ValueRule rules[] = { { "name", true, 0 }, - { "namespace", false, 0 }, - { "use-attribute-sets", false, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "name", true, 0, 0 }, + { "namespace", false, 0, 0 }, + { "use-attribute-sets", false, 0, 0 }, + { 0, false, 0, 0 } }; std::map attrs = gatherAttributes(qName, atts, rules); diff --git a/include/XSLT/impl/xslt_compilation_context.hpp b/include/XSLT/impl/xslt_compilation_context.hpp index 329d1ffc..06290425 100644 --- a/include/XSLT/impl/xslt_compilation_context.hpp +++ b/include/XSLT/impl/xslt_compilation_context.hpp @@ -202,16 +202,16 @@ private: typedef std::pair Namespace; StylesheetParser& parser_; - Arabica::XPath::XPath xpath_; CompiledStylesheet& stylesheet_; + mutable int autoNs_; + mutable bool current_allowed_; + Precedence precedence_; + Arabica::XPath::XPath xpath_; std::stack*> handlerStack_; std::stack parentStack_; std::map namespaceRemap_; - Precedence precedence_; CompilationContext(const CompilationContext&); - mutable int autoNs_; - mutable bool current_allowed_; class DisallowCurrent {