summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:11 +0200
commit8ca53be757b16be721dbdd334459b962b15980e1 (patch)
tree0ccf60e5b7ada2ea5569b068eb1ee18f79e9f6fb /tools
parente5de5696a49bec2876526fb30c49b30ff299fe6d (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Iedee28da32a4333a414e06877f87851345bb4e9b
Diffstat (limited to 'tools')
-rw-r--r--tools/source/debug/debug.cxx2
-rw-r--r--tools/source/generic/bigint.cxx6
-rw-r--r--tools/source/rc/resmgr.cxx2
-rw-r--r--tools/source/zcodec/zcodec.cxx6
4 files changed, 8 insertions, 8 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 38b6ba5f6c9a..aff0a3b3ab0e 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -258,7 +258,7 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
DebugData* pDebugData = ImplGetDebugData();
if ( nAction == DBG_FUNC_GETDATA )
- return (void*)&(pDebugData->aDbgData);
+ return static_cast<void*>(&(pDebugData->aDbgData));
else
{
switch ( nAction )
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index ff8ea889a4e3..cfc156ecae29 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -45,7 +45,7 @@ void BigInt::MakeBigInt( const BigInt& rVal )
{
if ( rVal.bIsBig )
{
- memcpy( (void*)this, (const void*)&rVal, sizeof( BigInt ) );
+ memcpy( static_cast<void*>(this), static_cast<const void*>(&rVal), sizeof( BigInt ) );
while ( nLen > 1 && nNum[nLen-1] == 0 )
nLen--;
}
@@ -476,7 +476,7 @@ BigInt::BigInt( const BigInt& rBigInt )
, bIsNeg(false)
{
if ( rBigInt.bIsBig )
- memcpy( (void*)this, (const void*)&rBigInt, sizeof( BigInt ) );
+ memcpy( static_cast<void*>(this), static_cast<const void*>(&rBigInt), sizeof( BigInt ) );
else
{
bIsSet = rBigInt.bIsSet;
@@ -647,7 +647,7 @@ BigInt& BigInt::operator=( const BigInt& rBigInt )
return *this;
if ( rBigInt.bIsBig )
- memcpy( (void*)this, (const void*)&rBigInt, sizeof( BigInt ) );
+ memcpy( static_cast<void*>(this), static_cast<const void*>(&rBigInt), sizeof( BigInt ) );
else
{
bIsSet = rBigInt.bIsSet;
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index d17c315b030a..da0db407672a 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -704,7 +704,7 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr,
static void RscException_Impl()
{
- switch ( osl_raiseSignal( OSL_SIGNAL_USER_RESOURCEFAILURE, (void*)"" ) )
+ switch ( osl_raiseSignal( OSL_SIGNAL_USER_RESOURCEFAILURE, const_cast<char *>("") ) )
{
case osl_Signal_ActCallNextHdl:
abort();
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index b5c645ac92e2..ed21965e98b1 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -72,9 +72,9 @@ void ZCodec::BeginCompression( int nCompressLevel, bool updateCrc, bool gzLib )
mnCompressLevel = nCompressLevel;
mbUpdateCrc = updateCrc;
mbGzLib = gzLib;
- PZSTREAM->zalloc = ( alloc_func )0;
- PZSTREAM->zfree = ( free_func )0;
- PZSTREAM->opaque = ( voidpf )0;
+ PZSTREAM->zalloc = nullptr;
+ PZSTREAM->zfree = nullptr;
+ PZSTREAM->opaque = nullptr;
PZSTREAM->avail_out = PZSTREAM->avail_in = 0;
}