You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by bo...@apache.org on 2010/01/26 10:58:40 UTC
svn commit: r903149 - in /xerces/c/trunk: samples/src/SCMPrint/SCMPrint.cpp
src/xercesc/internal/ValidationContextImpl.cpp
Author: borisk
Date: Tue Jan 26 09:58:40 2010
New Revision: 903149
URL: http://svn.apache.org/viewvc?rev=903149&view=rev
Log:
More warning fixes.
Modified:
xerces/c/trunk/samples/src/SCMPrint/SCMPrint.cpp
xerces/c/trunk/src/xercesc/internal/ValidationContextImpl.cpp
Modified: xerces/c/trunk/samples/src/SCMPrint/SCMPrint.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/samples/src/SCMPrint/SCMPrint.cpp?rev=903149&r1=903148&r2=903149&view=diff
==============================================================================
--- xerces/c/trunk/samples/src/SCMPrint/SCMPrint.cpp (original)
+++ xerces/c/trunk/samples/src/SCMPrint/SCMPrint.cpp Tue Jan 26 09:58:40 2010
@@ -265,8 +265,8 @@
return 1;
}
- XMLGrammarPool *grammarPool;
- SAX2XMLReader* parser;
+ XMLGrammarPool *grammarPool = 0;
+ SAX2XMLReader* parser = 0;
try
{
grammarPool = new XMLGrammarPoolImpl(XMLPlatformUtils::fgMemoryManager);
Modified: xerces/c/trunk/src/xercesc/internal/ValidationContextImpl.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/ValidationContextImpl.cpp?rev=903149&r1=903148&r2=903149&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/ValidationContextImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/ValidationContextImpl.cpp Tue Jan 26 09:58:40 2010
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -131,7 +131,7 @@
}
void ValidationContextImpl::toCheckIdRefList(bool toCheck)
-{
+{
fToCheckIdRefList = toCheck;
}
@@ -152,7 +152,7 @@
return tempPool;
}
-
+
void ValidationContextImpl::checkEntity(const XMLCh * const content) const
{
@@ -169,7 +169,7 @@
}
}
- else
+ else
{
ThrowXMLwithMemMgr1
(
@@ -182,34 +182,36 @@
}
-/* QName
+/* QName
*/
-bool ValidationContextImpl::isPrefixUnknown(XMLCh* prefix) {
+bool ValidationContextImpl::isPrefixUnknown(XMLCh* prefix) {
bool unknown = false;
if (XMLString::equals(prefix, XMLUni::fgXMLNSString)) {
- return true;
- }
+ return true;
+ }
else if (!XMLString::equals(prefix, XMLUni::fgXMLString)) {
if(fElemStack && !fElemStack->isEmpty())
fElemStack->mapPrefixToURI(prefix, unknown);
else if(fNamespaceScope)
unknown = (fNamespaceScope->getNamespaceForPrefix(prefix)==fNamespaceScope->getEmptyNamespaceId());
- }
+ }
return unknown;
}
-const XMLCh* ValidationContextImpl::getURIForPrefix(XMLCh* prefix) {
+const XMLCh* ValidationContextImpl::getURIForPrefix(XMLCh* prefix) {
bool unknown = false;
- unsigned int uriId;
+ unsigned int uriId = 0;
if(fElemStack)
uriId = fElemStack->mapPrefixToURI(prefix, unknown);
else if(fNamespaceScope)
- unknown = ((uriId = fNamespaceScope->getNamespaceForPrefix(prefix))==fNamespaceScope->getEmptyNamespaceId());
+ {
+ uriId = fNamespaceScope->getNamespaceForPrefix(prefix);
+ unknown = uriId == fNamespaceScope->getEmptyNamespaceId();
+ }
if (!unknown)
return fScanner->getURIText(uriId);
-
- return XMLUni::fgZeroLenString;
+
+ return XMLUni::fgZeroLenString;
}
XERCES_CPP_NAMESPACE_END
-
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org