diff options
author | Radu Ioan <ioan.radu.g@gmail.com> | 2015-02-14 00:31:54 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-02-17 06:15:54 +0000 |
commit | a8e6f0bea0e8bc028ee64d0b4d9046e52de94eda (patch) | |
tree | 49a2e34d88c5a0eb9d8a6a74e818d6597482fe36 /basic/source | |
parent | a30e2cb912c6bae240ced35a392151e34090665b (diff) |
tdf#39440 - cppcheck cleanliness
Fixed some cppcheck defects
Change-Id: I25fd6aba9d76df98d20b9a1bb4c9d3c1bf6f84bb
Reviewed-on: https://gerrit.libreoffice.org/14487
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/runtime/basrdll.cxx | 7 | ||||
-rw-r--r-- | basic/source/runtime/ddectrl.cxx | 1 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index 85fe73690eed..a1ad75ab7191 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -86,14 +86,13 @@ void BasicDLL::SetDebugMode( bool bDebugMode ) void BasicDLL::BasicBreak() { - // bJustStopping: if there's someone pressing STOP like crazy umpteen times, - // but the Basic doesn't stop early enough, the box might appear more often... - static bool bJustStopping = false; - BasicDLL* pThis = BASIC_DLL(); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); if ( pThis ) { + // bJustStopping: if there's someone pressing STOP like crazy umpteen times, + // but the Basic doesn't stop early enough, the box might appear more often... + static bool bJustStopping = false; if (StarBASIC::IsRunning() && !bJustStopping && (pThis->m_xImpl->bBreakEnabled || pThis->m_xImpl->bDebugMode)) { diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx index 2557c9e9fafd..232008a4d953 100644 --- a/basic/source/runtime/ddectrl.cxx +++ b/basic/source/runtime/ddectrl.cxx @@ -133,7 +133,6 @@ SbError SbiDdeControl::Terminate( size_t nChannel ) return SbERR_DDE_NO_CHANNEL; } delete pConv; - pConv = DDE_FREECHANNEL; return 0L; } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 4dc99796ae00..21d1cb809d99 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1397,12 +1397,13 @@ void SbiRuntime::StepCompare( SbxOperator eOp ) } static SbxVariable* pTRUE = NULL; static SbxVariable* pFALSE = NULL; - static SbxVariable* pNULL = NULL; // why do this on non-windows ? // why do this at all ? // I dumbly follow the pattern :-/ if ( bVBAEnabled && ( p1->IsNull() || p2->IsNull() ) ) { + static SbxVariable* pNULL = NULL; + if( !pNULL ) { pNULL = new SbxVariable; |