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 2008/09/16 16:00:20 UTC
svn commit: r695885 - in /xerces/c/trunk/src/xercesc:
internal/IGXMLScanner.cpp internal/SGXMLScanner.cpp
internal/XSAXMLScanner.cpp util/Transcoders/Iconv/IconvTransService.cpp
xinclude/XIncludeLocation.cpp
Author: borisk
Date: Tue Sep 16 07:00:19 2008
New Revision: 695885
URL: http://svn.apache.org/viewvc?rev=695885&view=rev
Log:
Fix warnings reported on HP-UX by aCC6.
Modified:
xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp
xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp
xerces/c/trunk/src/xercesc/internal/XSAXMLScanner.cpp
xerces/c/trunk/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp
xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp
Modified: xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp?rev=695885&r1=695884&r2=695885&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp Tue Sep 16 07:00:19 2008
@@ -2379,7 +2379,7 @@
// look in the list of undeclared elements, as would have been
// done before we made grammars stateless:
elemDecl = fSchemaElemNonDeclPool->getByKey(
- nameRawBuf, uriId, Grammar::TOP_LEVEL_SCOPE
+ nameRawBuf, uriId, (int)Grammar::TOP_LEVEL_SCOPE
);
}
}
@@ -2402,7 +2402,7 @@
);
elemDecl->setId(
fSchemaElemNonDeclPool->put((void*)elemDecl->getBaseName()
- , uriId, Grammar::TOP_LEVEL_SCOPE, (SchemaElementDecl*)elemDecl)
+ , uriId, (int)Grammar::TOP_LEVEL_SCOPE, (SchemaElementDecl*)elemDecl)
);
}
wasAdded = true;
Modified: xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp?rev=695885&r1=695884&r2=695885&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp Tue Sep 16 07:00:19 2008
@@ -1259,7 +1259,7 @@
{
// look in the list of undeclared elements, as would have been done
// before we made grammars stateless:
- elemDecl = fElemNonDeclPool->getByKey(nameRawBuf, uriId, Grammar::TOP_LEVEL_SCOPE);
+ elemDecl = fElemNonDeclPool->getByKey(nameRawBuf, uriId, (int)Grammar::TOP_LEVEL_SCOPE);
}
if(!elemDecl) {
// still not found in specified uri
@@ -1362,7 +1362,7 @@
{
// look in the list of undeclared elements, as would have been done
// before we made grammars stateless:
- elemDecl = fElemNonDeclPool->getByKey(nameRawBuf, uriId, Grammar::TOP_LEVEL_SCOPE);
+ elemDecl = fElemNonDeclPool->getByKey(nameRawBuf, uriId, (int)Grammar::TOP_LEVEL_SCOPE);
}
if (!elemDecl && orgGrammarUri != fEmptyNamespaceId) {
// still Not found in specified uri
Modified: xerces/c/trunk/src/xercesc/internal/XSAXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XSAXMLScanner.cpp?rev=695885&r1=695884&r2=695885&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XSAXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XSAXMLScanner.cpp Tue Sep 16 07:00:19 2008
@@ -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.
@@ -78,7 +78,7 @@
// Make sure that its the end of the element that we expect
const XMLCh *elemName = fElemStack.getCurrentSchemaElemName();
- const ElemStack::StackElem* topElem = fElemStack.popTop();
+ const ElemStack::StackElem* topElem = fElemStack.popTop();
if (!fReaderMgr.skippedString(elemName))
{
emitError
@@ -152,27 +152,27 @@
, topElem->fChildren[failure]->getRawName()
, topElem->fThisElement->getFormattedContentModel()
);
- }
+ }
}
}
- // now we can reset the datatype buffer, since the
+ // now we can reset the datatype buffer, since the
// application has had a chance to copy the characters somewhere else
((SchemaValidator *)fValidator)->clearDatatypeBuffer();
// If we have a doc handler, tell it about the end tag
if (fDocHandler)
- {
+ {
if (topElem->fPrefixColonPos != -1)
fPrefixBuf.set(elemName, topElem->fPrefixColonPos);
else
- fPrefixBuf.reset();
+ fPrefixBuf.reset();
fDocHandler->endElement
(
*topElem->fThisElement
, uriId
, isRoot
- , fPrefixBuf.getRawBuffer()
+ , fPrefixBuf.getRawBuffer()
);
}
@@ -204,7 +204,7 @@
// in the element name.
int prefixColonPos;
if (!fReaderMgr.getQName(fQNameBuf, &prefixColonPos))
- {
+ {
if (fQNameBuf.isEmpty())
emitError(XMLErrs::ExpectedElementName);
else
@@ -278,7 +278,7 @@
// Resolve the qualified name to a URI and name so that we can look up
// the element decl for this element. We have now update the prefix to
- // namespace map so we should get the correct element now.
+ // namespace map so we should get the correct element now.
unsigned int uriId = resolveQNameWithColon
(
qnameRawBuf, fPrefixBuf, ElemStack::Mode_Element, prefixColonPos
@@ -319,7 +319,7 @@
{
// if still not found, look in list of undeclared elements
elemDecl = fElemNonDeclPool->getByKey(
- nameRawBuf, uriId, Grammar::TOP_LEVEL_SCOPE);
+ nameRawBuf, uriId, (int)Grammar::TOP_LEVEL_SCOPE);
if (!elemDecl)
{
@@ -329,14 +329,13 @@
, SchemaElementDecl::Any, Grammar::TOP_LEVEL_SCOPE
, fMemoryManager
);
- elemDecl->setId
- (
- fElemNonDeclPool->put
- (
- (void*)elemDecl->getBaseName(), uriId
- , Grammar::TOP_LEVEL_SCOPE, (SchemaElementDecl*)elemDecl
- )
- );
+
+ elemDecl->setId (fElemNonDeclPool->put(
+ (void*)elemDecl->getBaseName(),
+ uriId,
+ (int)Grammar::TOP_LEVEL_SCOPE,
+ (SchemaElementDecl*)elemDecl));
+
wasAdded = true;
}
}
@@ -587,13 +586,13 @@
fReaderMgr.pushReader(newReader, 0);
// and reset security-related things if necessary:
- if(fSecurityManager != 0)
+ if(fSecurityManager != 0)
{
fEntityExpansionLimit = fSecurityManager->getEntityExpansionLimit();
fEntityExpansionCount = 0;
}
fElemCount = 0;
- if (fUIntPoolRowTotal >= 32)
+ if (fUIntPoolRowTotal >= 32)
{ // 8 KB tied up with validating attributes...
fAttDefRegistry->removeAll();
recreateUIntPool();
Modified: xerces/c/trunk/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp?rev=695885&r1=695884&r2=695885&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp Tue Sep 16 07:00:19 2008
@@ -329,7 +329,7 @@
// Ok, go ahead and try the transcoding. If it fails, then ...
size_t mblen = ::wcstombs(toFill, wideCharBuf, maxBytes);
- if (mblen == -1)
+ if (mblen == (size_t)-1)
{
if (allocatedArray)
manager->deallocate(allocatedArray);
@@ -381,7 +381,7 @@
else
wideCharBuf = tmpWideCharArr;
- if (::mbstowcs(wideCharBuf, toTranscode, maxChars) == -1)
+ if (::mbstowcs(wideCharBuf, toTranscode, maxChars) == (size_t)-1)
{
if (allocatedArray)
manager->deallocate(allocatedArray);
Modified: xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp?rev=695885&r1=695884&r2=695885&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp (original)
+++ xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp Tue Sep 16 07:00:19 2008
@@ -30,11 +30,11 @@
XERCES_CPP_NAMESPACE_BEGIN
const XMLCh *allocate(const XMLCh *href){
- const XMLCh *allocated;
+ XMLCh *allocated;
XMLSize_t length = XMLString::stringLen(href);
- allocated = (const XMLCh *)XMLPlatformUtils::fgMemoryManager->allocate((length+1) * sizeof(XMLCh));
- XMLString::copyString((XMLCh *)allocated, href);
- XMLPlatformUtils::removeDotDotSlash((XMLCh *const)allocated);
+ allocated = (XMLCh*)XMLPlatformUtils::fgMemoryManager->allocate((length+1) * sizeof(XMLCh));
+ XMLString::copyString(allocated, href);
+ XMLPlatformUtils::removeDotDotSlash(allocated);
return allocated;
}
@@ -67,7 +67,7 @@
return fHref;
}
- XMLPlatformUtils::removeDotDotSlash((XMLCh *const)baseToAdd);
+ XMLPlatformUtils::removeDotDotSlash((XMLCh*)baseToAdd);
XMLSize_t baseLength = XMLString::stringLen(baseToAdd);
int lastSlash = XMLString::lastIndexOf(baseToAdd, chForwardSlash);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org