DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22019>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22019

Warnings from AbstractDOMParser.hpp when compiling on HP

           Summary: Warnings from AbstractDOMParser.hpp when compiling on HP
           Product: Xerces-C++
           Version: 2.2.0
          Platform: HP
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Non-Validating Parser
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I get the following warnings when compiling on HP:

Warning 749: "AbstractDOMParser.hpp", line 1533 # The cast 
from 'xercesc_2_2::DOMDocument *' to 'xercesc_2_2::DOMDocumentImpl *' is 
performed as a 'reinterpret_cast'. This operation is non-portable and 
potentially unsafe.
Warning 740: "AbstractDOMParser.hpp", line 1533 # Unsafe cast between 
pointers/references to incomplete classes: casting 'xercesc_2_2::DOMDocument 
*' to 'xercesc_2_2::DOMDocumentImpl *'.

This corresponds to the following code:

inline void AbstractDOMParser::setDocument(DOMDocument* toSet)
{
    fDocument = (DOMDocumentImpl *) toSet;  // this is line 1533
}

The problem is that although DOMDocumentImpl inherits from DOMDocument,
this header does not know that (DOMDocumentImpl is only specified with
a forward declaration) and so a reinterpret_cast has to be used.

The reinterpret_cast can be avoided if the DOMDocumentImpl.hpp header
is included.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to