Author: amassari
Date: Mon May 22 01:47:04 2006
New Revision: 408605
URL: http://svn.apache.org/viewvc?rev=408605&view=rev
Log:
Remove warnings for MSVC
Modified:
xerces/c/trunk/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMNodeIDMap.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMNodeImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMTextImpl.cpp
xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp
xerces/c/trunk/src/xercesc/internal/ReaderMgr.cpp
xerces/c/trunk/src/xercesc/internal/XMLScanner.cpp
xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp
xerces/c/trunk/src/xercesc/util/PlatformUtils.cpp
xerces/c/trunk/src/xercesc/util/XML256TableTranscoder.cpp
xerces/c/trunk/src/xercesc/util/XMLAbstractDoubleFloat.cpp
xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp
xerces/c/trunk/src/xercesc/util/regx/Token.cpp
xerces/c/trunk/src/xercesc/validators/DTD/DTDScanner.cpp
xerces/c/trunk/src/xercesc/validators/common/CMNode.hpp
xerces/c/trunk/src/xercesc/validators/schema/identity/XercesXPath.cpp
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp Mon May 22
01:47:04 2006
@@ -131,17 +131,17 @@
pWalker->setCurrentNode((DOMNode*)this);
// Logically-adjacent text nodes are Text or CDATASection nodes that can
be visited sequentially in document order or in
// reversed document order without entering, exiting, or passing over
Element, Comment, or ProcessingInstruction nodes.
- while(true)
+ DOMNode* prevNode;
+ while((prevNode=pWalker->previousNode())!=NULL)
{
- DOMNode* prevNode=pWalker->previousNode();
- if(prevNode==NULL || prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
}
XMLBuffer buff(1023, GetDOMNodeMemoryManager);
- while(true)
+ DOMNode* nextNode;
+ while((nextNode=pWalker->nextNode())!=NULL)
{
- DOMNode* nextNode=pWalker->nextNode();
- if(nextNode==NULL || nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
if(nextNode->getNodeType()==TEXT_NODE ||
nextNode->getNodeType()==CDATA_SECTION_NODE)
buff.append(nextNode->getNodeValue());
@@ -160,19 +160,19 @@
// Logically-adjacent text nodes are Text or CDATASection nodes that can
be visited sequentially in document order or in
// reversed document order without entering, exiting, or passing over
Element, Comment, or ProcessingInstruction nodes.
DOMNode* pFirstTextNode=this;
- while(true)
+ DOMNode* prevNode;
+ while((prevNode=pWalker->previousNode())!=NULL)
{
- DOMNode* prevNode=pWalker->previousNode();
- if(prevNode==NULL || prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
pFirstTextNode=prevNode;
}
// before doing any change we need to check if we are going to remove an
entity reference that doesn't contain just text
DOMNode* pCurrentNode=pWalker->getCurrentNode();
- while(true)
+ DOMNode* nextNode;
+ while((nextNode=pWalker->nextNode())!=NULL)
{
- DOMNode* nextNode=pWalker->nextNode();
- if(nextNode==NULL || nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
if(nextNode->getNodeType()==ENTITY_REFERENCE_NODE)
{
@@ -206,10 +206,9 @@
}
// now delete all the following text nodes
pWalker->setCurrentNode(pCurrentNode);
- while(true)
+ while((nextNode=pWalker->nextNode())!=NULL)
{
- DOMNode* nextNode=pWalker->nextNode();
- if(nextNode==NULL || nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
if(nextNode!=retVal)
{
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMConfigurationImpl.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMConfigurationImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMConfigurationImpl.cpp Mon May 22
01:47:04 2006
@@ -188,8 +188,8 @@
case FEATURE_ELEMENT_CONTENT_WHITESPACE:
if(booleanValue) return true; // required //
else return false; // optional //
- default: return false; // should never be here
}
+ // should never be here
return false;
}
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp Mon May 22
01:47:04 2006
@@ -270,7 +270,7 @@
// along its way going back to write(). So far we don't come up with a
// "short-cut" to go "directly" back.
//
-#define TRY_CATCH_THROW(action, forceToRethrow) \
+#define TRY_CATCH_THROW(action) \
fFormatter->setUnRepFlags(XMLFormatter::UnRep_Fail); \
try \
{ \
@@ -278,11 +278,8 @@
} \
catch(TranscodingException const &e) \
{ \
- if ( !reportError(nodeToWrite \
- , DOMError::DOM_SEVERITY_FATAL_ERROR \
- , e.getMessage()) || \
- forceToRethrow) \
- throw e; \
+ reportError(nodeToWrite, DOMError::DOM_SEVERITY_FATAL_ERROR,
e.getMessage()); \
+ throw e; \
}
DOMLSSerializerImpl::~DOMLSSerializerImpl()
@@ -752,7 +749,6 @@
*fFormatter << chSpace << nodeValue;
}
*fFormatter << gEndPI;
- ,true
)
break;
}
@@ -846,7 +842,6 @@
// The name has to be representable without any escapes
*fFormatter << XMLFormatter::NoEscapes
<< chOpenAngle << nodeName;
- ,true
)
// Output any attributes on this element
@@ -1059,7 +1054,6 @@
(
*fFormatter << XMLFormatter::NoEscapes << gEndElement
<< nodeName << chCloseAngle;
- ,true
)
}
@@ -1077,7 +1071,6 @@
TRY_CATCH_THROW
(
*fFormatter << XMLFormatter::NoEscapes <<
chForwardSlash << chCloseAngle;
- , true
)
}
}
@@ -1149,7 +1142,6 @@
(
*fFormatter << XMLFormatter::NoEscapes << chAmpersand
<< nodeName << chSemiColon;
- , true
)
}
else
@@ -1170,7 +1162,6 @@
TRY_CATCH_THROW
(
*fFormatter<<XMLFormatter::NoEscapes<<chAmpersand<<nodeName<<chSemiColon;
- , true
)
}
}
@@ -1212,7 +1203,6 @@
(
// transcoder throws exception for unrep chars
*fFormatter << XMLFormatter::NoEscapes << gStartCDATA <<
nodeValue << gEndCDATA;
- , true
)
}
@@ -1234,7 +1224,6 @@
(
*fFormatter << XMLFormatter::NoEscapes << gStartComment
<< nodeValue << gEndComment;
- , true
)
break;
}
@@ -1292,8 +1281,6 @@
}
*fFormatter << chCloseAngle;
- , true
-
) // end of TRY_CATCH_THROW
break;
@@ -1524,7 +1511,6 @@
TRY_CATCH_THROW
(
*fFormatter << XMLFormatter::NoEscapes << gStartCDATA <<
gEndCDATA;
- , true
)
}
else
@@ -1580,9 +1566,8 @@
printNewLine();
printIndent(level);
TRY_CATCH_THROW
- (
+ (
*fFormatter << XMLFormatter::NoEscapes << gStartCDATA;
- , true
)
// We got at least some chars that can be done normally
@@ -1597,7 +1582,6 @@
TRY_CATCH_THROW
(
*fFormatter << XMLFormatter::NoEscapes << gEndCDATA;
- , true
)
// Update the source pointer to our new spot
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMNodeIDMap.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMNodeIDMap.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMNodeIDMap.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMNodeIDMap.cpp Mon May 22 01:47:04
2006
@@ -95,12 +95,8 @@
// the table is only filled by the parser from valid documents, which
// can not have duplicates. Behavior of invalid docs is not defined.
//
- while (true)
+ while (fTable[currentHash]!=0 && fTable[currentHash]!=(DOMAttr *)-1)
{
- DOMAttr *tableSlot = fTable[currentHash];
- if (tableSlot == 0 ||
- tableSlot == (DOMAttr *)-1)
- break;
currentHash += initalHash; // rehash
if (currentHash >= fSize)
currentHash = currentHash % fSize;
@@ -129,15 +125,9 @@
//
// Loop looking for a slot pointing to an attr with this id.
//
- while (true)
+ DOMAttr *tableSlot;
+ while ((tableSlot= fTable[currentHash])!=0)
{
- DOMAttr *tableSlot = fTable[currentHash];
- if (tableSlot == 0)
- {
- // There is no matching entry in the table
- return;
- }
-
if (tableSlot == attr)
{
// Found the attribute. Set the slot to -1 to indicate
@@ -152,7 +142,7 @@
if (currentHash >= fSize)
currentHash = currentHash % fSize;
}
-
+ // There is no matching entry in the table
}
@@ -168,16 +158,9 @@
//
// Loop looking for a slot pointing to an attr with this id.
//
- while (true)
+ DOMAttr *tableSlot;
+ while ((tableSlot= fTable[currentHash])!=0)
{
- DOMAttr *tableSlot = fTable[currentHash];
- if (tableSlot == 0)
- {
- // There is no matching entry in the table
- return 0;
- }
-
-
if ((tableSlot != (DOMAttr *)-1) &&
XMLString::equals(tableSlot->getValue(), id))
return tableSlot;
@@ -185,7 +168,8 @@
if (currentHash >= fSize)
currentHash = currentHash % fSize;
}
- return 0; // Never gets here, but keeps some compilers happy.
+ // There is no matching entry in the table
+ return 0;
}
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMNodeImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMNodeImpl.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMNodeImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMNodeImpl.cpp Mon May 22 01:47:04 2006
@@ -720,7 +720,8 @@
}
// We now have nodes at the same depth in the tree. Find a common
ancestor.
- const DOMNode *myNodeP, *hisNodeP;
+ const DOMNode *myNodeP=myRoot;
+ const DOMNode *hisNodeP=hisRoot;
while(myRoot!=hisRoot)
{
myNodeP = myRoot;
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMTextImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMTextImpl.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMTextImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMTextImpl.cpp Mon May 22 01:47:04 2006
@@ -140,17 +140,17 @@
pWalker->setCurrentNode((DOMNode*)this);
// Logically-adjacent text nodes are Text or CDATASection nodes that can
be visited sequentially in document order or in
// reversed document order without entering, exiting, or passing over
Element, Comment, or ProcessingInstruction nodes.
- while(true)
+ DOMNode* prevNode;
+ while((prevNode=pWalker->previousNode())!=NULL)
{
- DOMNode* prevNode=pWalker->previousNode();
- if(prevNode==NULL || prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
}
XMLBuffer buff(1023, GetDOMNodeMemoryManager);
- while(true)
+ DOMNode* nextNode;
+ while((nextNode=pWalker->nextNode())!=NULL)
{
- DOMNode* nextNode=pWalker->nextNode();
- if(nextNode==NULL || nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
if(nextNode->getNodeType()==TEXT_NODE ||
nextNode->getNodeType()==CDATA_SECTION_NODE)
buff.append(nextNode->getNodeValue());
@@ -169,19 +169,19 @@
// Logically-adjacent text nodes are Text or CDATASection nodes that can
be visited sequentially in document order or in
// reversed document order without entering, exiting, or passing over
Element, Comment, or ProcessingInstruction nodes.
DOMNode* pFirstTextNode=this;
- while(true)
+ DOMNode* prevNode;
+ while((prevNode=pWalker->previousNode())!=NULL)
{
- DOMNode* prevNode=pWalker->previousNode();
- if(prevNode==NULL || prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(prevNode->getNodeType()==ELEMENT_NODE ||
prevNode->getNodeType()==COMMENT_NODE ||
prevNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
pFirstTextNode=prevNode;
}
// before doing any change we need to check if we are going to remove an
entity reference that doesn't contain just text
DOMNode* pCurrentNode=pWalker->getCurrentNode();
- while(true)
+ DOMNode* nextNode;
+ while((nextNode=pWalker->nextNode())!=NULL)
{
- DOMNode* nextNode=pWalker->nextNode();
- if(nextNode==NULL || nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
if(nextNode->getNodeType()==ENTITY_REFERENCE_NODE)
{
@@ -215,10 +215,9 @@
}
// now delete all the following text nodes
pWalker->setCurrentNode(pCurrentNode);
- while(true)
+ while((nextNode=pWalker->nextNode())!=NULL)
{
- DOMNode* nextNode=pWalker->nextNode();
- if(nextNode==NULL || nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
+ if(nextNode->getNodeType()==ELEMENT_NODE ||
nextNode->getNodeType()==COMMENT_NODE ||
nextNode->getNodeType()==PROCESSING_INSTRUCTION_NODE)
break;
if(nextNode!=retVal)
{
Modified: xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp (original)
+++ xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp Mon May 22 01:47:04
2006
@@ -1156,20 +1156,17 @@
break;
}
}
-
- catch (SchemaDateTimeException &e)
- {
- status = checkTimeZoneError(datatype, e)? XSValue::st_FODT0003 :
st_FOCA0002;
- return 0;
- }
catch(const OutOfMemoryException&)
{
throw;
}
+ catch (SchemaDateTimeException &e)
+ {
+ status = checkTimeZoneError(datatype, e)? XSValue::st_FODT0003 :
st_FOCA0002;
+ }
catch (const NumberFormatException&)
{
status = st_FOCA0002;
- return 0;
}
return 0;
}
@@ -1453,7 +1450,6 @@
catch (const NumberFormatException&)
{
status = st_FOCA0002;
- return 0;
}
return 0;
}
@@ -1542,20 +1538,19 @@
return retVal;
}
- catch (SchemaDateTimeException const &e)
- {
- status = checkTimeZoneError(datatype, e)? XSValue::st_FODT0003 :
st_FOCA0002;
- return 0;
- }
catch(const OutOfMemoryException&)
{
throw;
}
+ catch (SchemaDateTimeException const &e)
+ {
+ status = checkTimeZoneError(datatype, e)? XSValue::st_FODT0003 :
st_FOCA0002;
+ }
catch (const NumberFormatException&)
{
status = st_FOCA0002;
- return 0;
}
+ return 0;
}
Modified: xerces/c/trunk/src/xercesc/internal/ReaderMgr.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/ReaderMgr.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/ReaderMgr.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/ReaderMgr.cpp Mon May 22 01:47:04 2006
@@ -117,16 +117,13 @@
// Reset the buffer before we start
toFill.reset();
- while (true)
+ //
+ // Get all the spaces from the current reader. If it returns true,
+ // it hit a non-space and we are done. Else we have to pop a reader
+ // and keep going.
+ //
+ while (!fCurReader->getSpaces(toFill))
{
- //
- // Get all the spaces from the current reader. If it returns true,
- // it hit a non-space and we are done. Else we have to pop a reader
- // and keep going.
- //
- if (fCurReader->getSpaces(toFill))
- break;
-
// We wore that one out, so lets pop a reader and try again
if (!popReader())
break;
@@ -145,11 +142,8 @@
// up all of its data. Else it returned because something matched, and
// we are done.
//
- while (true)
+ while (!fCurReader->getUpToCharOrWS(toFill, toCheck))
{
- if (fCurReader->getUpToCharOrWS(toFill, toCheck))
- break;
-
// We ate that one up, lets try to pop another. If not, break out
if (!popReader())
break;
@@ -250,16 +244,13 @@
{
bool skippedSomething = false;
bool tmpFlag;
- while (true)
+ //
+ // Skip all the spaces in the current reader. If it returned because
+ // it hit a non-space, break out. Else we have to pop another entity
+ // and keep going.
+ //
+ while (!fCurReader->skipSpaces(tmpFlag, inDecl))
{
- //
- // Skip all the spaces in the current reader. If it returned because
- // it hit a non-space, break out. Else we have to pop another entity
- // and keep going.
- //
- if (fCurReader->skipSpaces(tmpFlag, inDecl))
- break;
-
if (tmpFlag)
skippedSomething = true;
@@ -273,14 +264,9 @@
void ReaderMgr::skipQuotedString(const XMLCh quoteCh)
{
XMLCh nextCh;
- while (true)
+ // If we get an end of file char, then return
+ while ((nextCh = getNextChar())!=0)
{
- nextCh = getNextChar();
-
- // If we get an end of file char, then return
- if (!nextCh)
- break;
-
// If we get the quote char, then break out
if (nextCh == quoteCh)
break;
@@ -291,13 +277,9 @@
XMLCh ReaderMgr::skipUntilIn(const XMLCh* const listToSkip)
{
XMLCh nextCh;
- while (true)
+ // If we get an end of file char, then return
+ while ((nextCh = peekNextChar())!=0)
{
- nextCh = peekNextChar();
-
- if (!nextCh)
- break;
-
if (XMLString::indexOf(listToSkip, nextCh) != -1)
break;
@@ -311,13 +293,9 @@
XMLCh ReaderMgr::skipUntilInOrWS(const XMLCh* const listToSkip)
{
XMLCh nextCh;
- while (true)
+ // If we get an end of file char, then return
+ while ((nextCh = peekNextChar())!=0)
{
- nextCh = peekNextChar();
-
- if (!nextCh)
- break;
-
if (fCurReader->isWhitespace(nextCh))
break;
Modified: xerces/c/trunk/src/xercesc/internal/XMLScanner.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XMLScanner.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XMLScanner.cpp Mon May 22 01:47:04 2006
@@ -2032,15 +2032,10 @@
if (!fReaderMgr.skipIfQuote(quoteCh))
return false;
- while (true)
+ XMLCh nextCh;
+ // Get another char and see if it matches the starting quote char
+ while ((nextCh=fReaderMgr.getNextChar())!=quoteCh)
{
- // Get another char
- const XMLCh nextCh = fReaderMgr.getNextChar();
-
- // See if it matches the starting quote char
- if (nextCh == quoteCh)
- break;
-
// We should never get either an end of file null char here. If we
// do, just fail. It will be handled more gracefully in the higher
// level code that called us.
Modified: xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp Mon May 22
01:47:04 2006
@@ -1128,14 +1128,16 @@
return (alignAdjust(size) + size);
}
-void XSerializeEngine::trace(char* funcName) const
+void XSerializeEngine::trace(char* /*funcName*/) const
{
return;
- if (isStoring())
+/*
+ if (isStoring())
printf("\n funcName=<%s>, storing, count=<%lu>, postion=<%lu>\n",
funcName, fBufCount, getBufCurAccumulated());
else
printf("\n funcName=<%s>, loading, count=<%lu>, postion=<%lu>\n",
funcName, fBufCount, getBufCurAccumulated());
+*/
}
XERCES_CPP_NAMESPACE_END
Modified: xerces/c/trunk/src/xercesc/util/PlatformUtils.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/PlatformUtils.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/PlatformUtils.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/PlatformUtils.cpp Mon May 22 01:47:04 2006
@@ -436,7 +436,7 @@
XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain)
{
- XMLMsgLoader* ms;
+ XMLMsgLoader* ms=0;
try
{
@@ -446,8 +446,10 @@
ms = new MsgCatalogLoader(msgDomain);
#elif defined (XERCES_USE_WIN32_MSGLOADER)
ms = new Win32MsgLoader(msgDomain);
- #else // XERCES_USE_MSGLOADER_INMEMORY
+ #elif defined (XERCES_USE_MSGLOADER_INMEMORY)
ms = new InMemMsgLoader(msgDomain);
+ #else
+ #error No MsgLoader configured for platform! You must configure
it.
#endif
}
catch(const OutOfMemoryException&)
Modified: xerces/c/trunk/src/xercesc/util/XML256TableTranscoder.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XML256TableTranscoder.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XML256TableTranscoder.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XML256TableTranscoder.cpp Mon May 22
01:47:04 2006
@@ -120,7 +120,7 @@
// Get the next src char out to a temp, then do a binary search
// of the 'to' table for this entry.
//
- if ((nextOut = xlatOneTo(*srcPtr)))
+ if ((nextOut = xlatOneTo(*srcPtr))!=0)
{
*outPtr++ = nextOut;
srcPtr++;
Modified: xerces/c/trunk/src/xercesc/util/XMLAbstractDoubleFloat.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLAbstractDoubleFloat.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLAbstractDoubleFloat.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLAbstractDoubleFloat.cpp Mon May 22
01:47:04 2006
@@ -112,7 +112,7 @@
// since the call to strtod may allow other values. For example, AIX
// allows "infinity" and "+INF"
XMLCh curChar;
- while (curChar = tmpStrValue[lenTempStrValue]) {
+ while ((curChar = tmpStrValue[lenTempStrValue])!=0) {
if (!((curChar >= chDigit_0 &&
curChar <= chDigit_9) ||
curChar == chPeriod ||
@@ -394,7 +394,7 @@
bool dotSeen = false;
bool isValidStr = true;
XMLCh theChar;
- while ((theChar=*srcStr++) && isValidStr)
+ while ((theChar=*srcStr++)!=0 && isValidStr)
{
if ( theChar != chPeriod && theChar != chDigit_0 )
isValidStr = false; // invalid char
Modified: xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp Mon May 22
01:47:04 2006
@@ -986,10 +986,7 @@
const Op* tmpOp = operations;
bool ignoreCase = isSet(fOptions, IGNORE_CASE);
- while (true) {
-
- if (tmpOp == 0)
- break;
+ while (tmpOp != 0) {
if (offset > context->fLimit || offset < context->fStart)
return -1;
Modified: xerces/c/trunk/src/xercesc/util/regx/Token.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/regx/Token.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/regx/Token.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/regx/Token.cpp Mon May 22 01:47:04 2006
@@ -251,12 +251,11 @@
if (size() == 1)
return FC_CONTINUE;
- int ret2;
- if (ret1 != FC_ANY) {
- ret2 = getChild(1)->analyzeFirstCharacter(rangeTok,
options, tokFactory);
- }
+ if (ret1 == FC_ANY)
+ return FC_ANY;
- if (ret1 == FC_ANY || ret2 == FC_ANY)
+ int ret2 = getChild(1)->analyzeFirstCharacter(rangeTok,
options, tokFactory);
+ if (ret2 == FC_ANY)
return FC_ANY;
if (ret1 == FC_CONTINUE || ret2 == FC_CONTINUE)
Modified: xerces/c/trunk/src/xercesc/validators/DTD/DTDScanner.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/DTD/DTDScanner.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/DTD/DTDScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/DTD/DTDScanner.cpp Mon May 22
01:47:04 2006
@@ -375,15 +375,10 @@
if (!fReaderMgr->skipIfQuote(quoteCh))
return false;
- while (true)
+ XMLCh nextCh;
+ // Get another char and see if it matches the starting quote char
+ while ((nextCh=fReaderMgr->getNextChar())!=quoteCh)
{
- // Get another char
- const XMLCh nextCh = fReaderMgr->getNextChar();
-
- // See if it matches the starting quote char
- if (nextCh == quoteCh)
- break;
-
//
// We should never get either an end of file null char here. If we
// do, just fail. It will be handled more gracefully in the higher
@@ -1459,7 +1454,7 @@
else
bbComment.append(nextCh);
}
- else if (curState == OneDash)
+ else if (curState == OneDash)
{
//
// If its another dash, then we change to the two dashes states.
@@ -1470,14 +1465,14 @@
{
curState = TwoDashes;
}
- else
+ else
{
bbComment.append(chDash);
bbComment.append(nextCh);
curState = InText;
}
}
- else if (curState == TwoDashes)
+ else if (curState == TwoDashes)
{
// The next character must be the closing bracket
if (nextCh != chCloseAngle)
@@ -2495,7 +2490,11 @@
{
const XMLCh nextCh = fReaderMgr->peekNextChar();
- if (nextCh == chOpenAngle)
+ if (!nextCh)
+ {
+ return; // nothing left
+ }
+ else if (nextCh == chOpenAngle)
{
// Get the reader we started this on
// XML 1.0 P28a Well-formedness constraint: PE Between
Declarations
@@ -2523,7 +2522,7 @@
}
}
- else if (fReaderMgr->getCurrentReader()->isWhitespace(nextCh))
+ else if (fReaderMgr->getCurrentReader()->isWhitespace(nextCh))
{
//
// If we have a doc type handler, and advanced callbacks
are
@@ -2542,7 +2541,7 @@
, bbSpace.getLen()
);
}
- else
+ else
{
//
// If we hit an end of entity in the middle of white
@@ -2552,7 +2551,7 @@
fReaderMgr->skipPastSpaces();
}
}
- else if (nextCh == chPercent)
+ else if (nextCh == chPercent)
{
//
// Expand (and scan if external) the reference value. Tell
@@ -2562,7 +2561,7 @@
fReaderMgr->getNextChar();
expandPERef(true, false, false, true);
}
- else if (inIncludeSect && (nextCh == chCloseSquare))
+ else if (inIncludeSect && (nextCh == chCloseSquare))
{
//
// Its the end of a conditional include section. So scan
it and
@@ -2574,17 +2573,13 @@
fScanner->emitError(XMLErrs::ExpectedEndOfConditional);
fReaderMgr->skipPastChar(chCloseAngle);
}
- else if (!fReaderMgr->skippedChar(chCloseAngle))
+ else if (!fReaderMgr->skippedChar(chCloseAngle))
{
fScanner->emitError(XMLErrs::ExpectedEndOfConditional);
fReaderMgr->skipPastChar(chCloseAngle);
}
return;
}
- else if (!nextCh)
- {
- return; // nothing left
- }
else
{
fReaderMgr->getNextChar();
@@ -2616,7 +2611,6 @@
bAcceptDecl = false;
}
}
-
catch(const EndOfEntityException& toCatch)
{
//
@@ -3730,18 +3724,13 @@
return false;
}
- while (true)
+ XMLCh nextCh;
+ // Break out on terminating quote
+ while ((nextCh=fReaderMgr->getNextChar())!=quoteCh)
{
- const XMLCh nextCh = fReaderMgr->getNextChar();
-
// Watch for EOF
if (!nextCh)
ThrowXMLwithMemMgr(UnexpectedEOFException,
XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
-
- // Break out on terminating quote
- if (nextCh == quoteCh)
- break;
-
toFill.append(nextCh);
}
return true;
Modified: xerces/c/trunk/src/xercesc/validators/common/CMNode.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/common/CMNode.hpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/common/CMNode.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/common/CMNode.hpp Mon May 22 01:47:04
2006
@@ -132,7 +132,7 @@
, fType(type)
, fFirstPos(0)
, fLastPos(0)
- , fMaxStates(~0)
+ , fMaxStates(UINT_MAX)
{
}
Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/XercesXPath.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/XercesXPath.cpp?rev=408605&r1=408604&r2=408605&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/XercesXPath.cpp
(original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/XercesXPath.cpp Mon
May 22 01:47:04 2006
@@ -757,11 +757,7 @@
XMLCh ch;
XMLBuffer dataBuffer(128, tokens->getMemoryManager());
- while (true) {
-
- if (currentOffset == endOffset) {
- break;
- }
+ while (currentOffset != endOffset) {
ch = data[currentOffset];
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]