From 7f8d20b46f6063f5e394e37d5d6897023dec5b44 Mon Sep 17 00:00:00 2001 From: Jez Higgins Date: Sun, 10 Jan 2010 18:47:09 +0000 Subject: [PATCH] more warnings fixed --- examples/DOM/dom2pyx.cpp | 2 +- examples/Taggle/taggle.cpp | 2 ++ include/DOM/Simple/DocumentImpl.hpp | 2 +- include/SAX/filter/WhitespaceStripperFilter.hpp | 2 +- include/XPath/impl/xpath_axis_enumerator.hpp | 6 +++--- include/XPath/impl/xpath_function.hpp | 12 ++++++------ include/XPath/impl/xpath_function_resolver.hpp | 2 +- src/convert/base64codecvt.cpp | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/examples/DOM/dom2pyx.cpp b/examples/DOM/dom2pyx.cpp index 9cdff480..d5fadcc9 100755 --- a/examples/DOM/dom2pyx.cpp +++ b/examples/DOM/dom2pyx.cpp @@ -43,7 +43,7 @@ void generate_pyx(Arabica::DOM::Element element) if(element.hasAttributes()) { Arabica::DOM::NamedNodeMap attrs = element.getAttributes(); - for(int a = 0; a != attrs.getLength(); ++a) + for(size_t a = 0; a != attrs.getLength(); ++a) { Arabica::DOM::Node attr = attrs.item(a); std::cout << 'A' << attr.getNodeName() diff --git a/examples/Taggle/taggle.cpp b/examples/Taggle/taggle.cpp index 76cfd1de..ab7f0bad 100755 --- a/examples/Taggle/taggle.cpp +++ b/examples/Taggle/taggle.cpp @@ -1,4 +1,6 @@ +#ifdef _MSC_VER #pragma warning(disable: 4250) +#endif #include #include diff --git a/include/DOM/Simple/DocumentImpl.hpp b/include/DOM/Simple/DocumentImpl.hpp index 997b0610..4c588378 100644 --- a/include/DOM/Simple/DocumentImpl.hpp +++ b/include/DOM/Simple/DocumentImpl.hpp @@ -462,7 +462,7 @@ class DocumentImpl : public DOM::Document_impl, idNodes_.erase(n); } // removeElementId - stringT const* const stringPool(const stringT& str) const + stringT const* stringPool(const stringT& str) const { typename std::list::const_iterator i = std::find(stringPool_.begin(), stringPool_.end(), str); if(i != stringPool_.end()) diff --git a/include/SAX/filter/WhitespaceStripperFilter.hpp b/include/SAX/filter/WhitespaceStripperFilter.hpp index 3f942db2..4f494311 100644 --- a/include/SAX/filter/WhitespaceStripperFilter.hpp +++ b/include/SAX/filter/WhitespaceStripperFilter.hpp @@ -32,7 +32,7 @@ class WhitespaceStripper : public SAX::XMLFilterImpl(ch)); } // characters - virtual void ignorableWhitespace(const string_type& ch) + virtual void ignorableWhitespace(const string_type& /* ch */) { } // ignorableWhitespace }; // class WhitespaceStripper diff --git a/include/XPath/impl/xpath_axis_enumerator.hpp b/include/XPath/impl/xpath_axis_enumerator.hpp index 69e49d17..a654f472 100644 --- a/include/XPath/impl/xpath_axis_enumerator.hpp +++ b/include/XPath/impl/xpath_axis_enumerator.hpp @@ -86,7 +86,7 @@ public: bool forward() const { return walker_->forward(); } bool reverse() const { return !walker_->forward(); } const DOM::Node& operator*() const { return node_; } - const DOM::Node* const operator->() const { return &node_; } + const DOM::Node* operator->() const { return &node_; } AxisEnumerator& operator++() { advance(); return *this; } AxisEnumerator operator++(int) { AxisEnumerator copy(*this); advance(); return copy; } @@ -117,7 +117,7 @@ class AxisWalker { public: virtual ~AxisWalker() { } - DOM::Node_impl* const get() const { return current_; } + DOM::Node_impl* get() const { return current_; } virtual void advance() = 0; bool forward() { return forward_; } virtual AxisWalker* clone() const = 0; @@ -362,7 +362,7 @@ public: virtual AxisWalker* clone() const { return new DescendantAxisWalker(*this); } private: - const RawNodeT nextDescendant() + RawNodeT nextDescendant() { RawNodeT next = BaseT::get()->getFirstChild(); if(next == 0) diff --git a/include/XPath/impl/xpath_function.hpp b/include/XPath/impl/xpath_function.hpp index f298aa3d..d9074973 100644 --- a/include/XPath/impl/xpath_function.hpp +++ b/include/XPath/impl/xpath_function.hpp @@ -169,7 +169,7 @@ public: LastFn(const std::vector >& args) : NumericXPathFunction(0, 0, args) { } protected: - virtual double doEvaluate(const DOM::Node& context, + virtual double doEvaluate(const DOM::Node& /* context */, const ExecutionContext& executionContext) const { return executionContext.last(); @@ -184,7 +184,7 @@ public: PositionFn(const std::vector >& args) : NumericXPathFunction(0, 0, args) { } protected: - virtual double doEvaluate(const DOM::Node& context, + virtual double doEvaluate(const DOM::Node& /* context */, const ExecutionContext& executionContext) const { return executionContext.position(); @@ -597,8 +597,8 @@ public: TrueFn(const std::vector >& args) : BooleanXPathFunction(0, 0, args) { } protected: - virtual bool doEvaluate(const DOM::Node& context, - const ExecutionContext& executionContext) const + virtual bool doEvaluate(const DOM::Node& /* context */, + const ExecutionContext& /* executionContext */) const { return true; } // doEvaluate @@ -612,8 +612,8 @@ public: FalseFn(const std::vector >& args) : BooleanXPathFunction(0, 0, args) { } protected: - virtual bool doEvaluate(const DOM::Node& context, - const ExecutionContext& executionContext) const + virtual bool doEvaluate(const DOM::Node& /* context */, + const ExecutionContext& /* executionContext */) const { return false; } // evaluate diff --git a/include/XPath/impl/xpath_function_resolver.hpp b/include/XPath/impl/xpath_function_resolver.hpp index 43bcc8d0..57301597 100644 --- a/include/XPath/impl/xpath_function_resolver.hpp +++ b/include/XPath/impl/xpath_function_resolver.hpp @@ -44,7 +44,7 @@ public: virtual XPathFunction* resolveFunction(const string_type& namespace_uri, const string_type& name, - const std::vector >& argExprs) const + const std::vector >& /* argExprs */) const { string_type error; if(!string_adaptor::empty(namespace_uri)) diff --git a/src/convert/base64codecvt.cpp b/src/convert/base64codecvt.cpp index 723a083e..b6775962 100644 --- a/src/convert/base64codecvt.cpp +++ b/src/convert/base64codecvt.cpp @@ -116,7 +116,7 @@ std::codecvt_base::result base64codecvt::do_in(std::mbstate_t& state, return (from_next == from_end) ? std::codecvt_base::ok : std::codecvt_base::partial; } // do_in -std::codecvt_base::result base64codecvt::do_unshift(std::mbstate_t& state, +std::codecvt_base::result base64codecvt::do_unshift(std::mbstate_t& /* state */, char* to, char* to_limit, char*& to_next) const