Author: rleigh
Date: Wed Jun 14 21:36:41 2017
New Revision: 1798776
URL: http://svn.apache.org/viewvc?rev=1798776&view=rev
Log:
xercesc: XML*Transcoder: Suppress cast alignment warnings
Modified:
xerces/c/trunk/src/xercesc/util/XMLUCS4Transcoder.cpp
xerces/c/trunk/src/xercesc/util/XMLUTF16Transcoder.cpp
Modified: xerces/c/trunk/src/xercesc/util/XMLUCS4Transcoder.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLUCS4Transcoder.cpp?rev=1798776&r1=1798775&r2=1798776&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUCS4Transcoder.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUCS4Transcoder.cpp Wed Jun 14 21:36:41
2017
@@ -60,7 +60,7 @@ XMLUCS4Transcoder::transcodeFrom(const
// Get pointers to the start and end of the source buffer in terms of
// UCS-4 characters.
//
- const UCS4Ch* srcPtr = (const UCS4Ch*)srcData;
+ const UCS4Ch* srcPtr = reinterpret_cast<const UCS4Ch*>(srcData);
const UCS4Ch* srcEnd = srcPtr + (srcCount / sizeof(UCS4Ch));
//
@@ -157,7 +157,7 @@ XMLUCS4Transcoder::transcodeTo( const
// Get pointers to the start and end of the target buffer, in terms
// of UCS-4 chars.
//
- UCS4Ch* outPtr = (UCS4Ch*)toFill;
+ UCS4Ch* outPtr = reinterpret_cast<UCS4Ch*>(toFill);
UCS4Ch* outEnd = outPtr + (maxBytes / sizeof(UCS4Ch));
//
Modified: xerces/c/trunk/src/xercesc/util/XMLUTF16Transcoder.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLUTF16Transcoder.cpp?rev=1798776&r1=1798775&r2=1798776&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUTF16Transcoder.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUTF16Transcoder.cpp Wed Jun 14 21:36:41
2017
@@ -66,7 +66,7 @@ XMLUTF16Transcoder::transcodeFrom( cons
const XMLSize_t countToDo = srcChars < maxChars ? srcChars : maxChars;
// Look at the source data as UTF16 chars
- const UTF16Ch* asUTF16 = (const UTF16Ch*)srcData;
+ const UTF16Ch* asUTF16 = reinterpret_cast<const UTF16Ch*>(srcData);
// And get a mutable pointer to the output
XMLCh* outPtr = toFill;
@@ -139,7 +139,7 @@ XMLUTF16Transcoder::transcodeTo(const
// that we need to work with. And get a mutable pointer to the source
// character buffer.
//
- UTF16Ch* outPtr = (UTF16Ch*)toFill;
+ UTF16Ch* outPtr = reinterpret_cast<UTF16Ch*>(toFill);
const XMLCh* srcPtr = srcData;
//
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]