Author: rleigh
Date: Wed Jun 14 21:34:25 2017
New Revision: 1798774

URL: http://svn.apache.org/viewvc?rev=1798774&view=rev
Log:
xercesc: XMLReader: Suppress cast alignment warnings

Modified:
    xerces/c/trunk/src/xercesc/internal/XMLReader.cpp

Modified: xerces/c/trunk/src/xercesc/internal/XMLReader.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XMLReader.cpp?rev=1798774&r1=1798773&r2=1798774&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XMLReader.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XMLReader.cpp Wed Jun 14 21:34:25 2017
@@ -258,7 +258,7 @@ XMLReader::XMLReader(const  XMLCh* const
             if (fRawBytesAvail < 2)
                 break;
 
-            const UTF16Ch* asUTF16 = (const 
UTF16Ch*)&fRawByteBuf[fRawBufIndex];
+            const UTF16Ch* asUTF16 = reinterpret_cast<const 
UTF16Ch*>(&fRawByteBuf[fRawBufIndex]);
             if ((*asUTF16 == chUnicodeMarker) || (*asUTF16 == 
chSwappedUnicodeMarker))
             {
                 fRawBufIndex += sizeof(UTF16Ch);
@@ -1438,7 +1438,7 @@ void XMLReader::doInitDecode()
             }
 
             // Look at the raw buffer as UCS4 chars
-            const UCS4Ch* asUCS = (const UCS4Ch*)fRawByteBuf;
+            const UCS4Ch* asUCS = reinterpret_cast<const UCS4Ch*>(fRawByteBuf);
 
             while (fRawBufIndex < fRawBytesAvail)
             {
@@ -1561,7 +1561,7 @@ void XMLReader::doInitDecode()
                 break;
 
             XMLSize_t postBOMIndex = 0;
-            const UTF16Ch* asUTF16 = (const 
UTF16Ch*)&fRawByteBuf[fRawBufIndex];
+            const UTF16Ch* asUTF16 = reinterpret_cast<const 
UTF16Ch*>(&fRawByteBuf[fRawBufIndex]);
             if ((*asUTF16 == chUnicodeMarker) || (*asUTF16 == 
chSwappedUnicodeMarker))
             {
                 fRawBufIndex += sizeof(UTF16Ch);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to