You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Dan Gohman <dg...@earthlink.net> on 2002/10/10 13:52:25 UTC

audit of Xerces C++

I'm currently performing a rough audit of the Xerces C++ code base. Here are
some of the minor issues I've found so far.

util/Platforms/Linux/LinuxDefs.hpp
  Linux doesn't always run in little endian mode; many platforms it runs
  on are big endian.

  FileHandle can probably be `FILE*' instead of `void*'.

util/regx/Token.cpp
  The last case in the switch statement in Token::analyzeFirstCharacter has
  a statement with no effect, `FC_CONTINUE;', that appears to be missing a
  `return'.

util/regx/RangeToken.cpp
  In both RangeToken::setRangeValues and RangeToken::~RangeToken the delete
  on `fMap' should be changed to a `delete[]' because fMap is used to point
  to a dynamically allocated array

dom/impl/DOMDocumentImpl.cpp
  The argument to the `delete []' DOMDocumentImpl::deleteHeap should be
  casted to `char*' to avoid deleting with a `void*'.

dom/impl/DOMRangeImpl.cpp
  The second clause in the for loop in DOMRangeImpl::selectNode is parsed
  as a comma expression, not two conditions.

dom/impl/DOMWriterImpl.cpp
  featuresSupported should be an array of const bool instead of just bool.

validators/schema/TraverseSchema.cpp
  In TraverseSchema::traverseSimpleTypeDecl, the return type of
  XML::StringPool::addOrFind should be stored in an unsigned int.

I hope these are helpful.

Dan

-- 
Dan Gohman
dgohman@earthlink.net

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