summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-17 19:01:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:50 +0100
commitb70b4e644b5bb5356509505855418453dc621cfc (patch)
tree0a2441aa91947032d398b688f73553ff4d5a4afb /sal/qa
parent2e160b1e0e5b28b8a6ddfa07fc6ffff1c6e590bc (diff)
Some more loplugin:cstylecast: sal
Change-Id: Ie54d340478412e62b87d66e287fd8a3963e97898
Diffstat (limited to 'sal/qa')
-rw-r--r--sal/qa/osl/file/osl_File.cxx4
-rw-r--r--sal/qa/rtl/cipher/rtl_cipher.cxx4
-rw-r--r--sal/qa/rtl/digest/rtl_digest.cxx8
3 files changed, 8 insertions, 8 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index e573d4a04a19..434c0b7dc5af 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -2941,7 +2941,7 @@ namespace osl_File
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
CPPUNIT_ASSERT_MESSAGE( "test for readLine function: read the first line of the file.",
( ::osl::FileBase::E_None == nError1 ) &&
- ( 0 == strncmp( ( const char * )aSequence.getArray(), pBuffer_Char, 5 ) ) );
+ ( 0 == strncmp( reinterpret_cast<char *>(aSequence.getArray()), pBuffer_Char, 5 ) ) );
}
void readLine_002()
@@ -2962,7 +2962,7 @@ namespace osl_File
CPPUNIT_ASSERT_MESSAGE( "test for readLine function: read three lines of the file and check the file pointer moving.",
*pEOF &&
- ( 0 == strncmp( ( const char * )aSequence.getArray(), &pBuffer_Char[26], 26 ) ) );
+ ( 0 == strncmp( reinterpret_cast<char *>(aSequence.getArray()), &pBuffer_Char[26], 26 ) ) );
}
CPPUNIT_TEST_SUITE( readLine );
CPPUNIT_TEST( readLine_001 );
diff --git a/sal/qa/rtl/cipher/rtl_cipher.cxx b/sal/qa/rtl/cipher/rtl_cipher.cxx
index 0f713738e8cf..315fb9d57fc0 100644
--- a/sal/qa/rtl/cipher/rtl_cipher.cxx
+++ b/sal/qa/rtl/cipher/rtl_cipher.cxx
@@ -183,7 +183,7 @@ public:
sal_uInt32 nPlainTextLen = 16;
sal_uInt8 *pPlainTextBuffer = new sal_uInt8[ nPlainTextLen ];
memset(pPlainTextBuffer, 0, nPlainTextLen);
- strncpy((char*)pPlainTextBuffer, _sPlainTextStr.getStr(), 16);
+ strncpy(reinterpret_cast<char*>(pPlainTextBuffer), _sPlainTextStr.getStr(), 16);
sal_uInt32 nCipherLen = 16;
sal_uInt8 *pCipherBuffer = new sal_uInt8[ nCipherLen ];
@@ -231,7 +231,7 @@ public:
sal_uInt32 nPlainTextLen = 16;
sal_uInt8 *pPlainTextBuffer = new sal_uInt8[ nPlainTextLen ];
memset(pPlainTextBuffer, 0, nPlainTextLen);
- strncpy((char*)pPlainTextBuffer, _sPlainTextStr.getStr(), 16);
+ strncpy(reinterpret_cast<char*>(pPlainTextBuffer), _sPlainTextStr.getStr(), 16);
sal_uInt32 nCipherLen = 16;
sal_uInt8 *pCipherBuffer = new sal_uInt8[ nCipherLen ];
diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx
index 94d18b87c283..9e84e0630166 100644
--- a/sal/qa/rtl/digest/rtl_digest.cxx
+++ b/sal/qa/rtl/digest/rtl_digest.cxx
@@ -88,7 +88,7 @@ OString getDigest(const OString& aMessage, rtlDigestAlgorithm aAlgorithm)
{
rtlDigest handle = rtl_digest_create(aAlgorithm);
- const sal_uInt8* pData = (const sal_uInt8*) aMessage.getStr();
+ const sal_uInt8* pData = reinterpret_cast<const sal_uInt8*>(aMessage.getStr());
sal_uInt32 nSize = aMessage.getLength();
rtl_digest_init(handle, pData, nSize);
@@ -178,7 +178,7 @@ public:
handle = rtl_digest_create(constDigestAlgorithms[i]);
OString aMessage = sSampleString;
- const sal_uInt8* pData = (const sal_uInt8*) aMessage.getStr();
+ const sal_uInt8* pData = reinterpret_cast<const sal_uInt8*>(aMessage.getStr());
sal_uInt32 nSize = aMessage.getLength();
aError = rtl_digest_init(handle, pData, nSize);
@@ -239,7 +239,7 @@ public:
memset(pKeyBuffer.get(), 0, nKeyLen);
- sal_uInt8* pPassword = (sal_uInt8*)sPassword.getStr();
+ sal_uInt8 const * pPassword = reinterpret_cast<sal_uInt8 const *>(sPassword.getStr());
sal_Int32 nPasswordLen = sPassword.getLength();
sal_uInt32 nSaltDataLen = RTL_DIGEST_LENGTH_HMAC_SHA1;
@@ -299,7 +299,7 @@ public:
aHandle = rtl_digest_create( rtl_Digest_AlgorithmMD2 );
CPPUNIT_ASSERT_MESSAGE("create with rtl_Digest_AlgorithmMD2", aHandle != 0);
- const sal_uInt8* pData = (const sal_uInt8*)sSampleString.getStr();
+ const sal_uInt8* pData = reinterpret_cast<const sal_uInt8*>(sSampleString.getStr());
sal_uInt32 nSize = sSampleString.getLength();
aError = rtl_digest_updateMD2(aHandle, NULL, 0);