summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-07-30 10:08:45 +0200
committerJulien Nabet <serval2412@yahoo.fr>2011-07-30 10:08:45 +0200
commit37d7efc5f98f85437737a5dfce909b8dc43d2cbd (patch)
tree4d9f46f38ce3ec148a641d89f1a94ed96ef57c4f /basic
parent45ff90404b02ad76e76d83365dc296a0b1220a35 (diff)
Some cppcheck cleaning
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/sbx/sbxcurr.cxx1
-rw-r--r--basic/source/sbx/sbxdec.cxx2
-rw-r--r--basic/source/sbx/sbxstr.cxx2
4 files changed, 3 insertions, 4 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 0d74f14407d2..175d7a9eecf8 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3947,7 +3947,7 @@ RTLFUNC(StrConv)
sal_Char* pChar = new sal_Char[nSize+1];
for( sal_uInt16 i=0; i < nSize; i++ )
{
- pChar[i] = static_cast< sal_Char >( i%2 ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff );
+ pChar[i] = static_cast< sal_Char >( (i%2) ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff );
if( i%2 )
pSrc++;
}
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 0ea500bb0ba2..574c8048088e 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -529,7 +529,6 @@ start:
SbxBase::SetError( SbxERR_OVERFLOW ); val = 0;
}
*p->pULong = (sal_uInt32) val; break;
- break;
}
case SbxBYREF | SbxCURRENCY:
*p->pnInt64 = r; break;
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index ddf9d68489a5..45a7480f2a87 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -239,7 +239,7 @@ bool SbxDecimal::setString( ::rtl::OUString* pOUString )
i++;
}
hResult = VarDecFromStr( (OLECHAR*)pBuffer, nLANGID, 0, &maDec );
- delete pBuffer;
+ delete pBuffer[];
}
else
{
diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx
index 27d1ca192868..29969e9b8f00 100644
--- a/basic/source/sbx/sbxstr.cxx
+++ b/basic/source/sbx/sbxstr.cxx
@@ -278,7 +278,7 @@ SbxArray* StringToByteArray(const ::rtl::OUString& rStr)
for( sal_uInt16 i=0; i< nArraySize; i++)
{
SbxVariable* pNew = new SbxVariable( SbxBYTE );
- sal_uInt8 aByte = static_cast< sal_uInt8 >( i%2 ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff );
+ sal_uInt8 aByte = static_cast< sal_uInt8 >( (i%2) ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff );
pNew->PutByte( aByte );
pNew->SetFlag( SBX_WRITE );
pArray->Put( pNew, i );