xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bor...@apache.org
Subject svn commit: r901107 - in /xerces/c/trunk/src/xercesc: dom/impl/ framework/ internal/ parsers/ util/ util/Transcoders/ICU/ util/Transcoders/IconvGNU/ util/regx/ validators/common/ validators/schema/
Date Wed, 20 Jan 2010 08:46:16 GMT
Author: borisk
Date: Wed Jan 20 08:45:02 2010
New Revision: 901107

URL: http://svn.apache.org/viewvc?rev=901107&view=rev
Log:
Get rid of warnings uncovered with g++ -W -Wall.

Modified:
    xerces/c/trunk/src/xercesc/dom/impl/DOMAttrNSImpl.cpp
    xerces/c/trunk/src/xercesc/dom/impl/DOMElementImpl.cpp
    xerces/c/trunk/src/xercesc/framework/XMLAttr.cpp
    xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp
    xerces/c/trunk/src/xercesc/internal/XMLReader.cpp
    xerces/c/trunk/src/xercesc/parsers/AbstractDOMParser.cpp
    xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp
    xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
    xerces/c/trunk/src/xercesc/util/XMLDateTime.cpp
    xerces/c/trunk/src/xercesc/util/XMLString.cpp
    xerces/c/trunk/src/xercesc/util/XMLURL.cpp
    xerces/c/trunk/src/xercesc/util/regx/RangeToken.cpp
    xerces/c/trunk/src/xercesc/validators/common/AllContentModel.hpp
    xerces/c/trunk/src/xercesc/validators/common/CMStateSet.hpp
    xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp
    xerces/c/trunk/src/xercesc/validators/common/MixedContentModel.hpp
    xerces/c/trunk/src/xercesc/validators/common/SimpleContentModel.hpp
    xerces/c/trunk/src/xercesc/validators/schema/ComplexTypeInfo.cpp
    xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp

Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMAttrNSImpl.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMAttrNSImpl.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMAttrNSImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMAttrNSImpl.cpp Wed Jan 20 08:45:02 2010
@@ -133,10 +133,10 @@
     const XMLCh * xmlURI = DOMNodeImpl::getXmlURIString();
     const XMLCh * xmlnsURI = DOMNodeImpl::getXmlnsURIString();
 
-    if (XMLString::equals(prefix, xml)&&
-        !XMLString::equals(fNamespaceURI, xmlURI)||
-        XMLString::equals(prefix, xmlns)&&
-        !XMLString::equals(fNamespaceURI, xmlnsURI))
+    if ((XMLString::equals(prefix, xml) &&
+         !XMLString::equals(fNamespaceURI, xmlURI))
+        || (XMLString::equals(prefix, xmlns) &&
+            !XMLString::equals(fNamespaceURI, xmlnsURI)))
         throw DOMException(DOMException::NAMESPACE_ERR, 0, GetDOMNodeMemoryManager);
 
     if (XMLString::indexOf(prefix, chColon) != -1) {

Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMElementImpl.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMElementImpl.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMElementImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMElementImpl.cpp Wed Jan 20 08:45:02 2010
@@ -697,6 +697,8 @@
                         return e;
                 }
                 break;
+            default:
+                break;
         }
         n = n->getNextSibling();
     }
@@ -717,6 +719,8 @@
                         return e;
                 }
                 break;
+            default:
+                break;
         }
         n = n->getPreviousSibling();
     }
@@ -737,6 +741,8 @@
                         return e;
                 }
                 break;
+            default:
+                break;
         }
         n = getNextLogicalSibling(n);
     }
@@ -757,6 +763,8 @@
                         return e;
                 }
                 break;
+            default:
+                break;
         }
         n = getPreviousLogicalSibling(n);
     }
@@ -774,7 +782,7 @@
     return count;
 }
 
-// Returns the first element node found from a 
+// Returns the first element node found from a
 // non-recursive in order traversal of the given node.
 DOMElement* DOMElementImpl::getFirstElementChild(const DOMNode* n) const
 {
@@ -784,7 +792,7 @@
             return (DOMElement*) n;
         }
         DOMNode* next = n->getFirstChild();
-        while (next == NULL) {         
+        while (next == NULL) {
             if (top == n) {
                 break;
             }
@@ -801,7 +809,7 @@
     return NULL;
 }
 
-// Returns the first element node found from a 
+// Returns the first element node found from a
 // non-recursive reverse order traversal of the given node.
 DOMElement* DOMElementImpl::getLastElementChild(const DOMNode* n) const
 {
@@ -811,7 +819,7 @@
             return (DOMElement*) n;
         }
         DOMNode* next = n->getLastChild();
-        while (next == NULL) {         
+        while (next == NULL) {
             if (top == n) {
                 break;
             }
@@ -832,8 +840,8 @@
 DOMNode* DOMElementImpl::getNextLogicalSibling(const DOMNode* n) const
 {
     DOMNode* next = n->getNextSibling();
-    // If "n" has no following sibling and its parent is an entity reference node we 
-    // need to continue the search through the following siblings of the entity 
+    // If "n" has no following sibling and its parent is an entity reference node we
+    // need to continue the search through the following siblings of the entity
     // reference as these are logically siblings of the given node.
     if (next == NULL) {
         DOMNode* parent = n->getParentNode();
@@ -852,8 +860,8 @@
 DOMNode* DOMElementImpl::getPreviousLogicalSibling(const DOMNode* n) const
 {
     DOMNode* prev = n->getPreviousSibling();
-    // If "n" has no previous sibling and its parent is an entity reference node we 
-    // need to continue the search through the previous siblings of the entity 
+    // If "n" has no previous sibling and its parent is an entity reference node we
+    // need to continue the search through the previous siblings of the entity
     // reference as these are logically siblings of the given node.
     if (prev == NULL) {
         DOMNode* parent = n->getParentNode();

Modified: xerces/c/trunk/src/xercesc/framework/XMLAttr.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/framework/XMLAttr.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/XMLAttr.cpp (original)
+++ xerces/c/trunk/src/xercesc/framework/XMLAttr.cpp Wed Jan 20 08:45:02 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.
@@ -39,7 +39,7 @@
     , fValueBufSz(0)
     , fValue(0)
     , fAttName(0)
-    , fMemoryManager(manager)  
+    , fMemoryManager(manager)
 {
     fAttName = new (fMemoryManager) QName(fMemoryManager);
 }
@@ -52,16 +52,16 @@
                     , const XMLCh* const        attrValue
                     , const XMLAttDef::AttTypes type
                     , const bool                specified
-                    , MemoryManager* const      manager 
-                    , DatatypeValidator * datatypeValidator
-                    , const bool isSchema ):
+                    , MemoryManager* const      manager
+                    , DatatypeValidator*
+                    , const bool /*isSchema*/ ):
 
       fSpecified(specified)
     , fType(type)
     , fValueBufSz(0)
     , fValue(0)
     , fAttName(0)
-    , fMemoryManager(manager)   
+    , fMemoryManager(manager)
 {
     CleanupType cleanup(this, &XMLAttr::cleanUp);
 
@@ -89,16 +89,16 @@
                     , const XMLCh* const        attrValue
                     , const XMLAttDef::AttTypes type
                     , const bool                specified
-                    , MemoryManager* const      manager 
-                    , DatatypeValidator * datatypeValidator
-                    , const bool isSchema ):
+                    , MemoryManager* const      manager
+                    , DatatypeValidator *
+                    , const bool /*isSchema*/ ):
 
       fSpecified(specified)
     , fType(type)
     , fValueBufSz(0)
     , fValue(0)
     , fAttName(0)
-    , fMemoryManager(manager)  
+    , fMemoryManager(manager)
 {
     CleanupType cleanup(this, &XMLAttr::cleanUp);
 
@@ -170,4 +170,3 @@
 }
 
 XERCES_CPP_NAMESPACE_END
-

Modified: xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp (original)
+++ xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp Wed Jan 20 08:45:02 2010
@@ -506,7 +506,8 @@
    XMLSize_t count = oCount;
 
    while (count) {
-      const XMLSize_t srcChars = (count > kTmpBufSize) ? kTmpBufSize : count;
+     const XMLSize_t srcChars = (count > XMLSize_t (kTmpBufSize))
+       ? XMLSize_t (kTmpBufSize) : count;
 
       const XMLSize_t outBytes
          = fXCoder->transcodeTo(srcPtr, srcChars,

Modified: xerces/c/trunk/src/xercesc/internal/XMLReader.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XMLReader.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XMLReader.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XMLReader.cpp Wed Jan 20 08:45:02 2010
@@ -231,8 +231,8 @@
         case XMLRecognizer::UCS_4L :
         {
             if (fRawBytesAvail > 4 &&
-                ((fRawByteBuf[0] == 0x00) && (fRawByteBuf[1] == 0x00) &&
(fRawByteBuf[2] == 0xFE) && (fRawByteBuf[3] == 0xFF)) ||
-                ((fRawByteBuf[0] == 0xFF) && (fRawByteBuf[1] == 0xFE) &&
(fRawByteBuf[2] == 0x00) && (fRawByteBuf[3] == 0x00))  )
+                (((fRawByteBuf[0] == 0x00) && (fRawByteBuf[1] == 0x00) &&
(fRawByteBuf[2] == 0xFE) && (fRawByteBuf[3] == 0xFF)) ||
+                 ((fRawByteBuf[0] == 0xFF) && (fRawByteBuf[1] == 0xFE) &&
(fRawByteBuf[2] == 0x00) && (fRawByteBuf[3] == 0x00)))  )
             {
                 fRawBufIndex += 4;
             }

Modified: xerces/c/trunk/src/xercesc/parsers/AbstractDOMParser.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/AbstractDOMParser.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/AbstractDOMParser.cpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/AbstractDOMParser.cpp Wed Jan 20 08:45:02 2010
@@ -871,8 +871,10 @@
     if (fCurrentParent == fDocument)
         fWithinElement = false;
 
-    if(fDoXInclude && XIncludeUtils::isXIIncludeDOMNode(fCurrentNode)
-        || (XIncludeUtils::isXIFallbackDOMNode(fCurrentNode) && !XMLString::equals(fCurrentParent->getNamespaceURI(),
XIncludeUtils::fgXIIIncludeNamespaceURI)))
+    if(fDoXInclude &&
+       (XIncludeUtils::isXIIncludeDOMNode(fCurrentNode) ||
+        ((XIncludeUtils::isXIFallbackDOMNode(fCurrentNode) &&
+          !XMLString::equals(fCurrentParent->getNamespaceURI(), XIncludeUtils::fgXIIIncludeNamespaceURI)))))
     {
     	XIncludeUtils xiu((XMLErrorReporter *) this);
 	    // process the XInclude node, then update the fCurrentNode with the new content

Modified: xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp Wed Jan 20 08:45:02
2010
@@ -136,7 +136,7 @@
 // ---------------------------------------------------------------------------
 //  ICUTransService: Constructors and Destructor
 // ---------------------------------------------------------------------------
-ICUTransService::ICUTransService(MemoryManager* manager)
+ICUTransService::ICUTransService(MemoryManager*)
 {
   // Starting with ICU 3.4 we don't need to call init anymore.
   //

Modified: xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp Wed Jan
20 08:45:02 2010
@@ -1071,7 +1071,7 @@
     ,       XMLByte* const   toFill
     , const XMLSize_t        maxBytes
     ,       XMLSize_t&       charsEaten
-    , const UnRepOpts        options )
+    , const UnRepOpts        /*options*/ )
 {
     // Transcode FROM XMLCh
     char    tmpWBuff[gTempBuffArraySize];
@@ -1121,7 +1121,7 @@
     unsigned int    srcCount = 1;
     if (toCheck & 0xFFFF0000) {
         XMLCh    ch1 = (toCheck >> 10) + 0xD800;
-        XMLCh    ch2 = toCheck & 0x3FF + 0xDC00;
+        XMLCh    ch2 = (toCheck & 0x3FF) + 0xDC00;
         xmlToMbs(&ch1, srcBuf, 1);
         xmlToMbs(&ch2, srcBuf + uChSize(), 1);
         srcCount++;
@@ -1138,5 +1138,3 @@
 }
 
 XERCES_CPP_NAMESPACE_END
-
-

Modified: xerces/c/trunk/src/xercesc/util/XMLDateTime.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLDateTime.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLDateTime.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLDateTime.cpp Wed Jan 20 08:45:02 2010
@@ -63,13 +63,13 @@
                                          , UTC_NEG_CHAR
                                          , chNull};
 
-static const int YMD_MIN_SIZE    = 10;   // CCYY-MM-DD
-static const int YMONTH_MIN_SIZE = 7;    // CCYY_MM
-static const int TIME_MIN_SIZE   = 8;    // hh:mm:ss
-static const int TIMEZONE_SIZE   = 5;    // hh:mm
-static const int DAY_SIZE        = 5;    // ---DD
-//static const int MONTH_SIZE      = 6;    // --MM--
-static const int MONTHDAY_SIZE   = 7;    // --MM-DD
+static const XMLSize_t YMD_MIN_SIZE    = 10;   // CCYY-MM-DD
+static const XMLSize_t YMONTH_MIN_SIZE = 7;    // CCYY_MM
+static const XMLSize_t TIME_MIN_SIZE   = 8;    // hh:mm:ss
+static const XMLSize_t TIMEZONE_SIZE   = 5;    // hh:mm
+static const XMLSize_t DAY_SIZE        = 5;    // ---DD
+//static const XMLSize_t MONTH_SIZE      = 6;    // --MM--
+static const XMLSize_t MONTHDAY_SIZE   = 7;    // --MM-DD
 static const int NOT_FOUND       = -1;
 
 //define constants to be used in assigning default values for
@@ -865,7 +865,7 @@
         designator = true;
     }
 
-    if ( (fEnd == endDate) &&   // 'T' absent
+    if ( (fEnd == XMLSize_t (endDate)) &&   // 'T' absent
          (fStart != fEnd)   )   // something after Day
     {
         ThrowXMLwithMemMgr1(SchemaDateTimeException
@@ -874,7 +874,7 @@
                 , fMemoryManager);
     }
 
-    if ( fEnd != endDate ) // 'T' present
+    if ( fEnd != XMLSize_t (endDate) ) // 'T' present
     {
         //scan hours, minutes, seconds
         //
@@ -1068,7 +1068,7 @@
             fMiliSecond = parseMiliSecond(fStart, sign);  //get ms between UTC sign and fEnd
         }
 	}
-    else if(sign == 0 || sign != fStart)
+    else if(sign == 0 || XMLSize_t (sign) != fStart)
     {
         // seconds has more than 2 digits
         ThrowXMLwithMemMgr1(SchemaDateTimeException

Modified: xerces/c/trunk/src/xercesc/util/XMLString.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLString.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLString.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLString.cpp Wed Jan 20 08:45:02 2010
@@ -1715,8 +1715,7 @@
 //    #xA  Line Feed
 //    #x9  TAB
 //
-void XMLString::replaceWS(XMLCh* toConvert
-                          , MemoryManager* const  manager)
+void XMLString::replaceWS(XMLCh* toConvert, MemoryManager* const)
 {
     // If no string, then its a OK
     if (( !toConvert ) || ( !*toConvert ))
@@ -1848,8 +1847,7 @@
 //
 // remove whitespace
 //
-void XMLString::removeWS(XMLCh* toConvert
-                         , MemoryManager* const manager)
+void XMLString::removeWS(XMLCh* toConvert, MemoryManager* const)
 {
     // If no string, then its a failure
     if (( !toConvert ) || ( !*toConvert ))

Modified: xerces/c/trunk/src/xercesc/util/XMLURL.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLURL.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLURL.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLURL.cpp Wed Jan 20 08:45:02 2010
@@ -116,9 +116,9 @@
 // ---------------------------------------------------------------------------
 static bool isHexDigit(const XMLCh toCheck)
 {
-    if ((toCheck >= chDigit_0) && (toCheck <= chDigit_9)
-    ||  (toCheck >= chLatin_A) && (toCheck <= chLatin_Z)
-    ||  (toCheck >= chLatin_a) && (toCheck <= chLatin_z))
+    if (((toCheck >= chDigit_0) && (toCheck <= chDigit_9))
+    ||  ((toCheck >= chLatin_A) && (toCheck <= chLatin_Z))
+    ||  ((toCheck >= chLatin_a) && (toCheck <= chLatin_z)))
     {
         return true;
     }

Modified: xerces/c/trunk/src/xercesc/util/regx/RangeToken.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/regx/RangeToken.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/regx/RangeToken.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/regx/RangeToken.cpp Wed Jan 20 08:45:02 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.
@@ -55,7 +55,7 @@
 //  RangeToken: Constructors and Destructors
 // ---------------------------------------------------------------------------
 RangeToken::RangeToken(const Token::tokType tkType,
-                       MemoryManager* const manager) 
+                       MemoryManager* const manager)
     : Token(tkType, manager)
     , fSorted(false)
     , fCompacted(false)
@@ -158,13 +158,12 @@
 
         bool isNRange = (getTokenType() == T_NRANGE) ? true : false;
         RangeToken* lwrToken = tokFactory->createRange(isNRange);
-        unsigned int exceptIndex = 0;
 
 #if XERCES_USE_TRANSCODER_ICU && ((U_ICU_VERSION_MAJOR_NUM > 2) || (U_ICU_VERSION_MAJOR_NUM
== 2 && U_ICU_VERSION_MINOR_NUM >=4))
         UChar* rangeStr=(UChar*)fMemoryManager->allocate(40*fElemCount*sizeof(UChar));
         ArrayJanitor<UChar> janRange(rangeStr, fMemoryManager);
         int c=0;
-        rangeStr[c++] = chOpenSquare;        
+        rangeStr[c++] = chOpenSquare;
         for (unsigned int i = 0;  i < fElemCount - 1;  i += 2) {
             XMLCh buffer[10];
             XMLSize_t len, j;
@@ -218,6 +217,8 @@
             uset_close(range);
         }
 #else
+        unsigned int exceptIndex = 0;
+
         for (unsigned int i = 0;  i < fElemCount - 1;  i += 2) {
             for (XMLInt32 ch = fRanges[i];  ch <= fRanges[i + 1];  ++ch) {
 #if XERCES_USE_TRANSCODER_ICU

Modified: xerces/c/trunk/src/xercesc/validators/common/AllContentModel.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/common/AllContentModel.hpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/common/AllContentModel.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/common/AllContentModel.hpp Wed Jan 20 08:45:02 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.
@@ -161,13 +161,13 @@
 }
 
 inline bool
-AllContentModel::handleRepetitions( const QName* const curElem,
-                                    unsigned int curState,
-                                    unsigned int currentLoop,
-                                    unsigned int& nextState,
-                                    unsigned int& nextLoop,
-                                    XMLSize_t elementIndex,
-                                    SubstitutionGroupComparator * comparator) const
+AllContentModel::handleRepetitions( const QName* const /*curElem*/,
+                                    unsigned int /*curState*/,
+                                    unsigned int /*currentLoop*/,
+                                    unsigned int& /*nextState*/,
+                                    unsigned int& /*nextLoop*/,
+                                    XMLSize_t /*elementIndex*/,
+                                    SubstitutionGroupComparator * /*comparator*/) const
 {
     return true;
 }
@@ -175,4 +175,3 @@
 XERCES_CPP_NAMESPACE_END
 
 #endif
-

Modified: xerces/c/trunk/src/xercesc/validators/common/CMStateSet.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/common/CMStateSet.hpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/common/CMStateSet.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/common/CMStateSet.hpp Wed Jan 20 08:45:02 2010
@@ -175,10 +175,12 @@
             {
                 for (XMLSize_t index = 0; index < CMSTATE_CACHED_INT32_SIZE; index++)
                     if(setToOr.fBits[index])
+                    {
                         if(fBits[index])
                             fBits[index] |= setToOr.fBits[index];
                         else
                             fBits[index] = setToOr.fBits[index];
+                    }
             }
         }
         else
@@ -192,8 +194,8 @@
                     if(fDynamicBuffer->fBitArray[index]==NULL)
                     {
                         allocateChunk(index);
-                        memcpy((void *) fDynamicBuffer->fBitArray[index], 
-                               (const void *) other, 
+                        memcpy((void *) fDynamicBuffer->fBitArray[index],
+                               (const void *) other,
                                CMSTATE_BITFIELD_INT32_SIZE * sizeof(XMLInt32));
                     }
                     else
@@ -216,10 +218,12 @@
                         {
                             for(XMLSize_t subIndex = 0; subIndex < CMSTATE_BITFIELD_INT32_SIZE;
subIndex++)
                                 if(setToOr.fDynamicBuffer->fBitArray[index][subIndex])
+                                {
                                     if(fDynamicBuffer->fBitArray[index][subIndex])
                                         fDynamicBuffer->fBitArray[index][subIndex] |=
setToOr.fDynamicBuffer->fBitArray[index][subIndex];
                                     else
                                         fDynamicBuffer->fBitArray[index][subIndex] = setToOr.fDynamicBuffer->fBitArray[index][subIndex];
+                                }
                         }
                     }
                 }
@@ -244,7 +248,7 @@
         {
             for (XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
             {
-                XMLInt32 *& other = setToCompare.fDynamicBuffer->fBitArray[index],

+                XMLInt32 *& other = setToCompare.fDynamicBuffer->fBitArray[index],
                          *& mine = fDynamicBuffer->fBitArray[index];
                 if(mine==NULL && other==NULL)
                     continue;
@@ -268,10 +272,12 @@
 
         // They have to be the same size
         if (fBitCount != srcSet.fBitCount)
+        {
             if(fDynamicBuffer)
                 ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Bitset_NotEqualSize, fDynamicBuffer->fMemoryManager);
             else
                 ThrowXML(RuntimeException, XMLExcepts::Bitset_NotEqualSize);
+        }
 
         if(fDynamicBuffer==0)
         {
@@ -345,10 +351,12 @@
     bool getBit(const XMLSize_t bitToGet) const
     {
         if (bitToGet >= fBitCount)
+        {
             if(fDynamicBuffer)
                 ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex,
fDynamicBuffer->fMemoryManager);
             else
                 ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex);
+        }
 
         // And access the right bit and byte
         if(fDynamicBuffer==0)
@@ -397,10 +405,12 @@
     void setBit(const XMLSize_t bitToSet)
     {
         if (bitToSet >= fBitCount)
+        {
             if(fDynamicBuffer)
                 ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex,
fDynamicBuffer->fMemoryManager);
             else
                 ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex);
+        }
 
         const XMLInt32 mask = 1UL << (bitToSet % 32);
 
@@ -511,7 +521,7 @@
     //      If the bit count is greater than the threshold, then we allocate this structure
to
     //      store the bits, the length, and the memory manager to allocate/deallocate
     //      the memory
-    //      
+    //
     // -----------------------------------------------------------------------
     XMLSize_t        fBitCount;
     XMLInt32         fBits[CMSTATE_CACHED_INT32_SIZE];
@@ -542,7 +552,7 @@
                 if(fLastValue & mask)
                     fLastValue &= ~mask;
             }
-            // in case the 32 bit area contained only bits before 'start', advance 
+            // in case the 32 bit area contained only bits before 'start', advance
             if(fLastValue==0)
                 findNext();
         }

Modified: xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp Wed Jan 20 08:45:02 2010
@@ -544,7 +544,7 @@
                     nextState = tempNextState;
                     Occurence* o = fCountingStates[nextState];
                     if (o != 0) {
-                        nextLoop = (elemIndex == o->elemIndex) ? 1 : 0;
+                      nextLoop = (elemIndex == XMLSize_t (o->elemIndex)) ? 1 : 0;
                     }
                 }
             }
@@ -557,7 +557,7 @@
                 // counting state, reset the counter.
                 o = fCountingStates[nextState];
                 if (o != 0) {
-                    nextLoop = (elemIndex == o->elemIndex) ? 1 : 0;
+                  nextLoop = (elemIndex == XMLSize_t (o->elemIndex)) ? 1 : 0;
                 }
             }
         }
@@ -568,7 +568,7 @@
                 // If we've already seen one instance of the looping
                 // particle set the counter to 1, otherwise set it
                 // to 0.
-                nextLoop = (elemIndex == o->elemIndex) ? 1 : 0;
+              nextLoop = (elemIndex == XMLSize_t (o->elemIndex)) ? 1 : 0;
             }
         }
     }
@@ -1041,11 +1041,11 @@
                 // list of places where the currently tested item can appear. When this occurs,
the follow list of this parent item
                 // is added to the bitfield representing the next state.
                 // Both the bitfield and the list of places are sorted, so we can analyze
them in two ways; either iterating over the
-                // parent items, testing the bitfield for the existence of the parent (N
times a constant Tb), or by iterating over the 
+                // parent items, testing the bitfield for the existence of the parent (N
times a constant Tb), or by iterating over the
                 // bitfield (restricted to the range of the sorted list of places), using
a binary search to locate the leaf in the
                 // sorted list of places (M times log(N) testing operations Ts)
                 // Assuming that the time to test a bit is roughly the same of the time needed
to compute the average of two integers,
-                // plus a couple of comparisons and additions, we compare N agains M*log(N)
to decide which algorithm should be faster given 
+                // plus a couple of comparisons and additions, we compare N agains M*log(N)
to decide which algorithm should be faster given
                 // the two sets
                 if(fNumItems <= setT->getBitCountInRange(fLeafIndexes[1], fLeafIndexes[fNumItems])*log((float)fNumItems))
                 {
@@ -1369,7 +1369,6 @@
             , fLeafCount
             , fMemoryManager
         );
-        CMLeaf* leaf=(CMLeaf*)retNode;
         fLeafList[curIndex] = new (fMemoryManager) CMLeaf
         (
             curNode->getElement()
@@ -1397,7 +1396,6 @@
             , fLeafCount
             , fMemoryManager
         );
-        CMLeaf* leaf=(CMLeaf*)retNode;
         fLeafList[curIndex] = new (fMemoryManager) CMRepeatingLeaf
         (
             curNode->getFirst()->getElement()

Modified: xerces/c/trunk/src/xercesc/validators/common/MixedContentModel.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/common/MixedContentModel.hpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/common/MixedContentModel.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/common/MixedContentModel.hpp Wed Jan 20 08:45:02
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.
@@ -172,22 +172,22 @@
 }
 
 inline bool
-MixedContentModel::handleRepetitions( const QName* const curElem,
-                                    unsigned int curState,
-                                    unsigned int currentLoop,
-                                    unsigned int& nextState,
-                                    unsigned int& nextLoop,
-                                    XMLSize_t elementIndex,
-                                    SubstitutionGroupComparator * comparator) const
+MixedContentModel::handleRepetitions( const QName* const /*curElem*/,
+                                      unsigned int /*curState*/,
+                                      unsigned int /*currentLoop*/,
+                                      unsigned int& /*nextState*/,
+                                      unsigned int& /*nextLoop*/,
+                                      XMLSize_t /*elementIndex*/,
+                                      SubstitutionGroupComparator * /*comparator*/) const
 {
     return true;
 }
 
 inline void MixedContentModel::checkUniqueParticleAttribution
     (
-        SchemaGrammar*    const 
-      , GrammarResolver*  const 
-      , XMLStringPool*    const 
+        SchemaGrammar*    const
+      , GrammarResolver*  const
+      , XMLStringPool*    const
       , XMLValidator*     const
       , unsigned int*     const pContentSpecOrgURI
       , const XMLCh*            /*pComplexTypeName*/ /*= 0*/

Modified: xerces/c/trunk/src/xercesc/validators/common/SimpleContentModel.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/common/SimpleContentModel.hpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/common/SimpleContentModel.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/common/SimpleContentModel.hpp Wed Jan 20 08:45:02
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.
@@ -196,13 +196,13 @@
 }
 
 inline bool
-SimpleContentModel::handleRepetitions( const QName* const curElem,
-                                    unsigned int curState,
-                                    unsigned int currentLoop,
-                                    unsigned int& nextState,
-                                    unsigned int& nextLoop,
-                                    XMLSize_t elementIndex,
-                                    SubstitutionGroupComparator * comparator) const
+SimpleContentModel::handleRepetitions( const QName* const /*curElem*/,
+                                       unsigned int /*curState*/,
+                                       unsigned int /*currentLoop*/,
+                                       unsigned int& /*nextState*/,
+                                       unsigned int& /*nextLoop*/,
+                                       XMLSize_t /*elementIndex*/,
+                                       SubstitutionGroupComparator * /*comparator*/) const
 {
     return true;
 }

Modified: xerces/c/trunk/src/xercesc/validators/schema/ComplexTypeInfo.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/ComplexTypeInfo.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/ComplexTypeInfo.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/ComplexTypeInfo.cpp Wed Jan 20 08:45:02 2010
@@ -98,7 +98,7 @@
   ComplexTypeInfo::fAnyType = 0;
 }
 
-ComplexTypeInfo* ComplexTypeInfo::getAnyType(unsigned int emptyNSId)
+ComplexTypeInfo* ComplexTypeInfo::getAnyType(unsigned int /*emptyNSId*/)
 {
     return fAnyType;
 }
@@ -288,12 +288,12 @@
     return newValue;
 }
 
-bool ComplexTypeInfo::useRepeatingLeafNodes(ContentSpecNode* particle) 
+bool ComplexTypeInfo::useRepeatingLeafNodes(ContentSpecNode* particle)
 {
     int maxOccurs = particle->getMaxOccurs();
     int minOccurs = particle->getMinOccurs();
     ContentSpecNode::NodeTypes type = particle->getType();
-    
+
     if (((type & 0x0f) == ContentSpecNode::Choice) ||  ((type & 0x0f) == ContentSpecNode::Sequence))
     {
         if (minOccurs != 1 || maxOccurs != 1) {
@@ -302,7 +302,7 @@
                 ContentSpecNode* particle2 = particle->getFirst();
                 ContentSpecNode::NodeTypes type2 = particle2->getType();
                 return (((type2 == ContentSpecNode::Leaf) ||
-                        ((type2 & 0x0f) == ContentSpecNode::Any) || 
+                        ((type2 & 0x0f) == ContentSpecNode::Any) ||
                         ((type2 & 0x0f) == ContentSpecNode::Any_Other) ||
                         ((type2 & 0x0f) == ContentSpecNode::Any_NS)) &&
                         particle2->getMinOccurs() == 1 &&
@@ -347,7 +347,7 @@
         cmRet = new (fMemoryManager) MixedContentModel(false, aSpecNode, false, fMemoryManager);
     }
     else if (fContentType == SchemaElementDecl::Mixed_Complex ||
-             fContentType == SchemaElementDecl::Children) 
+             fContentType == SchemaElementDecl::Children)
     {
         bool isMixed = (fContentType == SchemaElementDecl::Mixed_Complex);
 
@@ -599,8 +599,8 @@
         );
     }
     // if what is being repeated is a leaf avoid expanding the tree
-    else if(bAllowCompactSyntax && 
-        (saveNode->getType()==ContentSpecNode::Leaf || 
+    else if(bAllowCompactSyntax &&
+        (saveNode->getType()==ContentSpecNode::Leaf ||
         (saveNode->getType() & 0x0f)==ContentSpecNode::Any ||
         (saveNode->getType() & 0x0f)==ContentSpecNode::Any_Other ||
         (saveNode->getType() & 0x0f)==ContentSpecNode::Any_NS))
@@ -616,7 +616,7 @@
         );
         retNode->setMinOccurs(minOccurs);
         retNode->setMaxOccurs(maxOccurs);
-        
+
         if(minOccurs==0)
             retNode = new (fMemoryManager) ContentSpecNode
             (
@@ -909,5 +909,3 @@
 /**
   * End of file ComplexTypeInfo.cpp
   */
-
-

Modified: xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp?rev=901107&r1=901106&r2=901107&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp Wed Jan 20 08:45:02 2010
@@ -9219,7 +9219,7 @@
         , const XMLCh* const        errDomain
         , const ErrTypes            type
         , const XMLCh* const        errorText
-        , const XMLCh* const        systemId
+        , const XMLCh* const        /*systemId*/
         , const XMLCh* const        publicId
         , const XMLFileLoc          lineNum
         , const XMLFileLoc          colNum



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


Mime
View raw message