summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-02 11:27:54 +0200
commit609707dd218613c5bd2416d681cba78c9cefdca6 (patch)
tree6a7b0bb37658489b217756c2a61453abb1b3e77c
parent04b9ff9a8842bc23306c38f9bd1af7cd941d0eb8 (diff)
loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Ie77fdb078c9c8f8ed01dfd6c5dd583c6535803b2
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx4
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index a01bec327ac9..c1395f82f5c6 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -737,7 +737,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen,
const unsigned int buf_increment_size = 16384;
*pOutBuf = static_cast<sal_uInt8*>(rtl_reallocateMemory( *pOutBuf, buf_increment_size ));
- aZStr.next_out = (Bytef*)*pOutBuf;
+ aZStr.next_out = reinterpret_cast<Bytef*>(*pOutBuf);
aZStr.avail_out = buf_increment_size;
*pOutLen = buf_increment_size;
while( err != Z_STREAM_END && err >= Z_OK && aZStr.avail_in )
@@ -749,7 +749,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen,
{
const int nNewAlloc = *pOutLen + buf_increment_size;
*pOutBuf = static_cast<sal_uInt8*>(rtl_reallocateMemory( *pOutBuf, nNewAlloc ));
- aZStr.next_out = (Bytef*)(*pOutBuf + *pOutLen);
+ aZStr.next_out = reinterpret_cast<Bytef*>(*pOutBuf + *pOutLen);
aZStr.avail_out = buf_increment_size;
*pOutLen = nNewAlloc;
}
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index 37ec3b992be0..46185ea08f29 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -150,7 +150,7 @@ void PngHelper::endChunk( size_t nStart, OutputBuffer& o_rOutputBuf )
set( nDataLen, o_rOutputBuf, nStart );
// append chunk crc
- sal_uInt32 nChunkCRC = getCRC( (sal_uInt8*)&o_rOutputBuf[nStart+4], nLen-4 );
+ sal_uInt32 nChunkCRC = getCRC( reinterpret_cast<sal_uInt8*>(&o_rOutputBuf[nStart+4]), nLen-4 );
append( nChunkCRC, o_rOutputBuf );
}