amassari 2005/01/07 07:32:35 Modified: c/src/xercesc/dom/impl DOMAttrImpl.cpp DOMCDATASectionImpl.cpp DOMCharacterDataImpl.cpp DOMCommentImpl.cpp DOMDocumentImpl.cpp DOMElementImpl.cpp DOMEntityImpl.cpp DOMEntityReferenceImpl.cpp DOMNodeIteratorImpl.cpp DOMNotationImpl.cpp DOMProcessingInstructionImpl.cpp DOMRangeImpl.cpp DOMTextImpl.cpp DOMTreeWalkerImpl.cpp DOMTypeInfoImpl.cpp Log: Removed warnings Revision Changes Path 1.22 +7 -3 xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.cpp Index: DOMAttrImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- DOMAttrImpl.cpp 20 Sep 2004 15:00:50 -0000 1.21 +++ DOMAttrImpl.cpp 7 Jan 2005 15:32:34 -0000 1.22 @@ -37,8 +37,12 @@ fNode.isSpecified(true); } -DOMAttrImpl::DOMAttrImpl(const DOMAttrImpl &other, bool) - : fNode(other.fNode), fParent (other.fParent), fName(other.fName), fSchemaType(other.fSchemaType) +DOMAttrImpl::DOMAttrImpl(const DOMAttrImpl &other, bool /*deep*/) + : DOMAttr(other) + , fNode(other.fNode) + , fParent (other.fParent) + , fName(other.fName) + , fSchemaType(other.fSchemaType) { if (other.fNode.isSpecified()) fNode.isSpecified(true); 1.16 +6 -5 xml-xerces/c/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp Index: DOMCDATASectionImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- DOMCDATASectionImpl.cpp 8 Sep 2004 13:55:51 -0000 1.15 +++ DOMCDATASectionImpl.cpp 7 Jan 2005 15:32:34 -0000 1.16 @@ -36,13 +36,14 @@ } -DOMCDATASectionImpl::DOMCDATASectionImpl(const DOMCDATASectionImpl &other, bool) - : fNode(*castToNodeImpl(&other)), +DOMCDATASectionImpl::DOMCDATASectionImpl(const DOMCDATASectionImpl &other, bool /*deep*/) + : DOMCDATASection(other), + fNode(*castToNodeImpl(&other)), fParent(*castToParentImpl(&other)), fChild(*castToChildImpl(&other)), fCharacterData(other.fCharacterData) { - // revisit. SOmething nees to make "deep" work. + // revisit. Something nees to make "deep" work. } @@ -88,7 +89,7 @@ throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR, 0, GetDOMNodeMemoryManager); } XMLSize_t len = fCharacterData.fDataBuf->getLen(); - if (offset > len || offset < 0) + if (offset > len) throw DOMException(DOMException::INDEX_SIZE_ERR, 0, GetDOMNodeMemoryManager); DOMText *newText = 1.11 +4 -4 xml-xerces/c/src/xercesc/dom/impl/DOMCharacterDataImpl.cpp Index: DOMCharacterDataImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMCharacterDataImpl.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- DOMCharacterDataImpl.cpp 8 Sep 2004 13:55:51 -0000 1.10 +++ DOMCharacterDataImpl.cpp 7 Jan 2005 15:32:34 -0000 1.11 @@ -109,7 +109,7 @@ // XMLSize_t len = this->fDataBuf->getLen(); - if (offset > len || offset < 0 || count < 0) + if (offset > len) throw DOMException(DOMException::INDEX_SIZE_ERR, 0, GetDOMCharacterDataImplMemoryManager); @@ -190,7 +190,7 @@ // XMLSize_t len = fDataBuf->getLen(); - if (offset > len || offset < 0) + if (offset > len) throw DOMException(DOMException::INDEX_SIZE_ERR, 0, GetDOMCharacterDataImplMemoryManager); XMLSize_t datLen = XMLString::stringLen(dat); @@ -265,7 +265,7 @@ XMLSize_t len = fDataBuf->getLen(); - if (offset > len || offset < 0 || count < 0) + if (offset > len) throw DOMException(DOMException::INDEX_SIZE_ERR, 0, GetDOMCharacterDataImplMemoryManager); 1.16 +2 -2 xml-xerces/c/src/xercesc/dom/impl/DOMCommentImpl.cpp Index: DOMCommentImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMCommentImpl.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- DOMCommentImpl.cpp 8 Sep 2004 13:55:51 -0000 1.15 +++ DOMCommentImpl.cpp 7 Jan 2005 15:32:34 -0000 1.16 @@ -97,7 +97,7 @@ DOMException::NO_MODIFICATION_ALLOWED_ERR, 0, GetDOMNodeMemoryManager); } XMLSize_t len = fCharacterData.fDataBuf->getLen(); - if (offset > len || offset < 0) + if (offset > len) throw DOMException(DOMException::INDEX_SIZE_ERR, 0, GetDOMNodeMemoryManager); DOMComment *newText = 1.61 +4 -4 xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.cpp Index: DOMDocumentImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- DOMDocumentImpl.cpp 30 Dec 2004 14:54:25 -0000 1.60 +++ DOMDocumentImpl.cpp 7 Jan 2005 15:32:34 -0000 1.61 @@ -795,9 +795,9 @@ static const int kHeapAllocSize = 0x10000; // The chunk size to allocate from the // system allocator. -static const int kMaxSubAllocationSize = 4096; // Any request for more bytes - // than this will be handled by - // allocating directly with system. +static const size_t kMaxSubAllocationSize = 4096; // Any request for more bytes + // than this will be handled by + // allocating directly with system. void * DOMDocumentImpl::allocate(size_t amount) { 1.29 +3 -2 xml-xerces/c/src/xercesc/dom/impl/DOMElementImpl.cpp Index: DOMElementImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMElementImpl.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- DOMElementImpl.cpp 20 Sep 2004 15:00:50 -0000 1.28 +++ DOMElementImpl.cpp 7 Jan 2005 15:32:34 -0000 1.29 @@ -58,7 +58,8 @@ DOMElementImpl::DOMElementImpl(const DOMElementImpl &other, bool deep) - : fNode(other.getOwnerDocument()), + : DOMElement(other), + fNode(other.getOwnerDocument()), fParent(other.getOwnerDocument()), fAttributes(0), fDefaultAttributes(0) 1.19 +3 -2 xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.cpp Index: DOMEntityImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- DOMEntityImpl.cpp 8 Sep 2004 13:55:51 -0000 1.18 +++ DOMEntityImpl.cpp 7 Jan 2005 15:32:34 -0000 1.19 @@ -45,7 +45,8 @@ DOMEntityImpl::DOMEntityImpl(const DOMEntityImpl &other, bool deep) - : fNode(other.fNode), + : DOMEntity(other), + fNode(other.fNode), fParent(other.fParent), fName(other.fName), fPublicId(other.fPublicId), 1.16 +7 -2 xml-xerces/c/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp Index: DOMEntityReferenceImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- DOMEntityReferenceImpl.cpp 8 Sep 2004 13:55:51 -0000 1.15 +++ DOMEntityReferenceImpl.cpp 7 Jan 2005 15:32:34 -0000 1.16 @@ -89,7 +89,12 @@ DOMEntityReferenceImpl::DOMEntityReferenceImpl(const DOMEntityReferenceImpl &other, bool deep) - : fNode(other.fNode), fParent(other.fParent), fChild(other.fChild), fName(other.fName), fBaseURI(other.fBaseURI) + : DOMEntityReference(other), + fNode(other.fNode), + fParent(other.fParent), + fChild(other.fChild), + fName(other.fName), + fBaseURI(other.fBaseURI) { if (deep) fParent.cloneChildren(&other); 1.10 +3 -2 xml-xerces/c/src/xercesc/dom/impl/DOMNodeIteratorImpl.cpp Index: DOMNodeIteratorImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMNodeIteratorImpl.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- DOMNodeIteratorImpl.cpp 6 Dec 2004 11:50:30 -0000 1.9 +++ DOMNodeIteratorImpl.cpp 7 Jan 2005 15:32:34 -0000 1.10 @@ -53,7 +53,8 @@ DOMNodeIteratorImpl::DOMNodeIteratorImpl ( const DOMNodeIteratorImpl& toCopy) - : fRoot(toCopy.fRoot), + : DOMNodeIterator(toCopy), + fRoot(toCopy.fRoot), fDocument(toCopy.fDocument), fWhatToShow(toCopy.fWhatToShow), fNodeFilter(toCopy.fNodeFilter), 1.16 +8 -4 xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.cpp Index: DOMNotationImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- DOMNotationImpl.cpp 8 Sep 2004 13:55:52 -0000 1.15 +++ DOMNotationImpl.cpp 7 Jan 2005 15:32:34 -0000 1.16 @@ -32,9 +32,13 @@ fName = ((DOMDocumentImpl *)ownerDoc)->getPooledString(nName); } -DOMNotationImpl::DOMNotationImpl(const DOMNotationImpl &other, bool) - : fNode(other.fNode), fName(other.fName), fPublicId(other.fPublicId), - fSystemId(other.fSystemId), fBaseURI(other.fBaseURI) +DOMNotationImpl::DOMNotationImpl(const DOMNotationImpl &other, bool /*deep*/) + : DOMNotation(other), + fNode(other.fNode), + fName(other.fName), + fPublicId(other.fPublicId), + fSystemId(other.fSystemId), + fBaseURI(other.fBaseURI) { fNode.setIsLeafNode(true); } 1.15 +9 -5 xml-xerces/c/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp Index: DOMProcessingInstructionImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- DOMProcessingInstructionImpl.cpp 8 Sep 2004 13:55:52 -0000 1.14 +++ DOMProcessingInstructionImpl.cpp 7 Jan 2005 15:32:34 -0000 1.15 @@ -41,9 +41,13 @@ DOMProcessingInstructionImpl::DOMProcessingInstructionImpl( const DOMProcessingInstructionImpl &other, - bool) - : fNode(other.fNode), fChild(other.fChild), fCharacterData(other.fCharacterData), - fTarget(other.fTarget), fBaseURI(other.fBaseURI) + bool /*deep*/) + : DOMProcessingInstruction(other), + fNode(other.fNode), + fChild(other.fChild), + fCharacterData(other.fCharacterData), + fTarget(other.fTarget), + fBaseURI(other.fBaseURI) { fNode.setIsLeafNode(true); } @@ -124,7 +128,7 @@ DOMException::NO_MODIFICATION_ALLOWED_ERR, 0, GetDOMNodeMemoryManager); } XMLSize_t len = fCharacterData.fDataBuf->getLen(); - if (offset > len || offset < 0) + if (offset > len) throw DOMException(DOMException::INDEX_SIZE_ERR, 0, GetDOMNodeMemoryManager); DOMProcessingInstruction *newText = 1.20 +6 -6 xml-xerces/c/src/xercesc/dom/impl/DOMRangeImpl.cpp Index: DOMRangeImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMRangeImpl.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- DOMRangeImpl.cpp 8 Sep 2004 13:55:52 -0000 1.19 +++ DOMRangeImpl.cpp 7 Jan 2005 15:32:34 -0000 1.20 @@ -56,7 +56,8 @@ } DOMRangeImpl::DOMRangeImpl(const DOMRangeImpl& other) -: fStartContainer(other.fStartContainer), +: DOMRange(other), + fStartContainer(other.fStartContainer), fStartOffset(other.fStartOffset), fEndContainer(other.fEndContainer), fEndOffset(other.fEndOffset), @@ -630,6 +631,9 @@ offsetB = srcRange->getEndOffset(); offsetA = fEndOffset; break; + default: + throw DOMException( + DOMException::INVALID_STATE_ERR, 0, fMemoryManager); } // case 1: same container @@ -1080,10 +1084,6 @@ void DOMRangeImpl::checkIndex(const DOMNode* node, XMLSize_t offset) const { - if (offset < 0) { - throw DOMException( DOMException::INDEX_SIZE_ERR, 0, fMemoryManager); - } - short type = node->getNodeType(); if((type == DOMNode::TEXT_NODE 1.15 +5 -3 xml-xerces/c/src/xercesc/dom/impl/DOMTextImpl.cpp Index: DOMTextImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMTextImpl.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- DOMTextImpl.cpp 8 Sep 2004 13:55:52 -0000 1.14 +++ DOMTextImpl.cpp 7 Jan 2005 15:32:34 -0000 1.15 @@ -45,7 +45,9 @@ } DOMTextImpl::DOMTextImpl(const DOMTextImpl &other, bool) - : fNode(other.fNode), fCharacterData(other.fCharacterData) + : DOMText(other) + , fNode(other.fNode) + , fCharacterData(other.fCharacterData) { fNode.setIsLeafNode(true); } @@ -81,7 +83,7 @@ DOMException::NO_MODIFICATION_ALLOWED_ERR, 0, GetDOMNodeMemoryManager); } XMLSize_t len = fCharacterData.fDataBuf->getLen(); - if (offset > len || offset < 0) + if (offset > len) throw DOMException(DOMException::INDEX_SIZE_ERR, 0, GetDOMNodeMemoryManager); DOMText *newText = 1.11 +3 -2 xml-xerces/c/src/xercesc/dom/impl/DOMTreeWalkerImpl.cpp Index: DOMTreeWalkerImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMTreeWalkerImpl.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- DOMTreeWalkerImpl.cpp 12 Dec 2004 15:59:24 -0000 1.10 +++ DOMTreeWalkerImpl.cpp 7 Jan 2005 15:32:34 -0000 1.11 @@ -42,7 +42,8 @@ DOMTreeWalkerImpl::DOMTreeWalkerImpl (const DOMTreeWalkerImpl& twi) -: fWhatToShow(twi.fWhatToShow), +: DOMTreeWalker(twi), + fWhatToShow(twi.fWhatToShow), fNodeFilter(twi.fNodeFilter), fCurrentNode(twi.fCurrentNode), fRoot(twi.fRoot), 1.5 +5 -1 xml-xerces/c/src/xercesc/dom/impl/DOMTypeInfoImpl.cpp Index: DOMTypeInfoImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMTypeInfoImpl.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DOMTypeInfoImpl.cpp 20 Sep 2004 15:00:50 -0000 1.4 +++ DOMTypeInfoImpl.cpp 7 Jan 2005 15:32:34 -0000 1.5 @@ -82,6 +82,7 @@ case PSVI_Member_Type_Definition_Namespace: return fMemberTypeNamespace; case PSVI_Schema_Default: return fDefaultValue; case PSVI_Schema_Normalized_Value: return fNormalizedValue; + default: assert(false); /* it's not a string property */ } return 0; } @@ -96,6 +97,7 @@ case PSVI_Nil: return (fBitFields & (1 << 7))?true:false; case PSVI_Member_Type_Definition_Anonymous: return (fBitFields & (1 << 8))?true:false; case PSVI_Schema_Specified: return (fBitFields & (1 << 9))?true:false; + default: assert(false); /* it's not a numeric property */ } return 0; } @@ -109,7 +111,8 @@ case PSVI_Member_Type_Definition_Namespace: fMemberTypeNamespace=value; break; case PSVI_Schema_Default: fDefaultValue=value; break; case PSVI_Schema_Normalized_Value: fNormalizedValue=value; break; -} + default: assert(false); /* it's not a string property */ + } } void DOMTypeInfoImpl::setNumericProperty(PSVIProperty prop, int value) { @@ -122,6 +125,7 @@ case PSVI_Nil: fBitFields |= (value!=0)?(1 << 7):0; break; case PSVI_Member_Type_Definition_Anonymous: fBitFields |= (value!=0)?(1 << 8):0; break; case PSVI_Schema_Specified: fBitFields |= (value!=0)?(1 << 9):0; break; + default: assert(false); /* it's not a numeric property */ } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]