diff --git a/include/XSLT/impl/xslt_precedence.hpp b/include/XSLT/impl/xslt_precedence.hpp index 1214300b..e6d905ca 100644 --- a/include/XSLT/impl/xslt_precedence.hpp +++ b/include/XSLT/impl/xslt_precedence.hpp @@ -66,7 +66,7 @@ public: if(other.precedence_.size() <= precedence_.size()) return false; - for(int i = 0, ie = precedence_.size(); i != ie; ++i) + for(size_t i = 0, ie = precedence_.size(); i != ie; ++i) if(other.precedence_[i] != precedence_[i]) return false; @@ -93,8 +93,8 @@ bool operator<(const Precedence& lhs, const Precedence& rhs) if(lhs.precedence_ == rhs.precedence_) return false; - int len = (std::min)(lhs.precedence_.size(), rhs.precedence_.size()); - for(int c = 0; c != len; ++c) + size_t len = (std::min)(lhs.precedence_.size(), rhs.precedence_.size()); + for(size_t c = 0; c != len; ++c) { if(lhs.precedence_[c] < rhs.precedence_[c]) return true; diff --git a/src/io/uri.cpp b/src/io/uri.cpp index f28351ee..24e3cf64 100644 --- a/src/io/uri.cpp +++ b/src/io/uri.cpp @@ -182,7 +182,7 @@ void URI::combinePath(const std::string& relPath) size_t dots = path_.find("/../", from); while(dots != std::string::npos) { - int preceding_slash = (dots > 0) ? path_.rfind(FORWARD_SLASH, dots-1) : 0; + size_t preceding_slash = (dots > 0) ? path_.rfind(FORWARD_SLASH, dots-1) : 0; path_.erase(preceding_slash, dots+3-preceding_slash); dots = path_.find("/../", preceding_slash); } // while diff --git a/tests/DOM/conformance/level1/core/characterdataappenddata.hpp b/tests/DOM/conformance/level1/core/characterdataappenddata.hpp index 3511a9ca..4a663998 100644 --- a/tests/DOM/conformance/level1/core/characterdataappenddata.hpp +++ b/tests/DOM/conformance/level1/core/characterdataappenddata.hpp @@ -83,7 +83,7 @@ class characterdataappenddata : public DOMTestCase Node nameNode; CharacterData child; String childValue; - int childLength; + size_t childLength; doc = (Document) baseT::load("staff", true); elementList = doc.getElementsByTagName(SA::construct_from_utf8("name")); nameNode = elementList.item(0); @@ -91,7 +91,7 @@ class characterdataappenddata : public DOMTestCase child.appendData(SA::construct_from_utf8(", Esquire")); childValue = child.getData(); childLength = SA::length(childValue); - baseT::assertEquals(24, childLength, __LINE__, __FILE__); + baseT::assertEquals(24, static_cast(childLength), __LINE__, __FILE__); } diff --git a/tests/DOM/conformance/level1/core/characterdatagetlength.hpp b/tests/DOM/conformance/level1/core/characterdatagetlength.hpp index 1c7f5257..f15a947c 100644 --- a/tests/DOM/conformance/level1/core/characterdatagetlength.hpp +++ b/tests/DOM/conformance/level1/core/characterdatagetlength.hpp @@ -79,14 +79,14 @@ class characterdatagetlength : public DOMTestCase Node nameNode; CharacterData child; String childValue; - int childLength; + size_t childLength; doc = (Document) baseT::load("staff", false); elementList = doc.getElementsByTagName(SA::construct_from_utf8("name")); nameNode = elementList.item(0); child = (CharacterData) nameNode.getFirstChild(); childValue = child.getData(); childLength = SA::length(childValue); - baseT::assertEquals(15, childLength, __LINE__, __FILE__); + baseT::assertEquals(15, static_cast(childLength), __LINE__, __FILE__); } diff --git a/tests/DOM/conformance/level1/core/hc_characterdataappenddata.hpp b/tests/DOM/conformance/level1/core/hc_characterdataappenddata.hpp index 9a13d189..d81e0cfd 100644 --- a/tests/DOM/conformance/level1/core/hc_characterdataappenddata.hpp +++ b/tests/DOM/conformance/level1/core/hc_characterdataappenddata.hpp @@ -82,7 +82,7 @@ class hc_characterdataappenddata : public DOMTestCase(childLength), __LINE__, __FILE__); } diff --git a/tests/DOM/conformance/level1/core/hc_characterdatagetlength.hpp b/tests/DOM/conformance/level1/core/hc_characterdatagetlength.hpp index 68202994..08c5aa94 100644 --- a/tests/DOM/conformance/level1/core/hc_characterdatagetlength.hpp +++ b/tests/DOM/conformance/level1/core/hc_characterdatagetlength.hpp @@ -78,14 +78,14 @@ class hc_characterdatagetlength : public DOMTestCase(childLength), __LINE__, __FILE__); }