From 4deef99ee8d4f8643024f2cd4b7fe2374f0e8c4b Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Sat, 25 Jul 2009 07:41:42 +0000 Subject: [PATCH] Silence GCC warnings. svn path=/trunk/; revision=42192 --- .../base/shell/explorer/utility/xmlstorage.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/reactos/base/shell/explorer/utility/xmlstorage.cpp b/reactos/base/shell/explorer/utility/xmlstorage.cpp index 1e7f28b1d45..0be330e114c 100644 --- a/reactos/base/shell/explorer/utility/xmlstorage.cpp +++ b/reactos/base/shell/explorer/utility/xmlstorage.cpp @@ -305,13 +305,14 @@ int XMLNode::count(XPath::const_iterator from, const XPath::const_iterator& to) int n = 0; for(XMLNode::Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) - if (elem.matches(**it, n)) + if (elem.matches(**it, n)) { if (from != to) // iterate deeper cnt += (*it)->count(from, to); else // increment match counter ++cnt; + } return cnt; } @@ -863,7 +864,7 @@ void XMLReaderBase::StartElementHandler(const XS_String& name, const XMLNode::At if (!isspace((unsigned char)p[-1])) break; - if (p != s) + if (p != s) { if (_pos->_children.empty()) { // no children in last node? if (_last_tag == TAG_START) _pos->_content.append(s, p-s); @@ -873,6 +874,7 @@ void XMLReaderBase::StartElementHandler(const XS_String& name, const XMLNode::At p = s; } else _pos->_children.back()->_trailing.append(s, p-s); + } std::string leading; @@ -914,13 +916,14 @@ void XMLReaderBase::EndElementHandler() _pos->_cdata_content = false; } - if (p != s) + if (p != s) { if (_pos->_children.empty()) // no children in current node? _pos->_content.append(s, p-s); else if (_last_tag == TAG_START) _pos->_content.append(s, p-s); else _pos->_children.back()->_trailing.append(s, p-s); + } if (p != e) _pos->_end_leading.assign(p, e-p); @@ -989,9 +992,10 @@ void XMLWriter::write_pre(StackEntry& entry) if (_format._pretty >= PRETTY_LINEFEED) _out << _format._endl; - if (_format._pretty == PRETTY_INDENT) + if (_format._pretty == PRETTY_INDENT) { for(size_t i=_stack.size(); --i>0; ) _out << XML_INDENT_SPACE; + } _out << '<' << EncodeXMLString(entry._node_name); //entry._state = PRE; @@ -1020,9 +1024,10 @@ void XMLWriter::write_post(StackEntry& entry) if (_format._pretty>=PRETTY_LINEFEED && entry._content.empty()) _out << _format._endl; - if (_format._pretty==PRETTY_INDENT && entry._content.empty()) + if (_format._pretty==PRETTY_INDENT && entry._content.empty()) { for(size_t i=_stack.size(); --i>0; ) _out << XML_INDENT_SPACE; + } _out << ""; } else {