diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-29 17:12:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-29 17:14:55 +0000 |
commit | 2938f629601f0f759b99144d583fc9c0b9f66782 (patch) | |
tree | 39e674be95385f1818b449682fc01ae579fbf180 /basic | |
parent | 552ce16afa6cce9f6ff320d2225dd883647c5cb0 (diff) |
WaE: various new gcc 4.6.0 warnings
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/codegen.cxx | 8 | ||||
-rw-r--r-- | basic/source/comp/loops.cxx | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 8f67efd3ff7c..064e57ff6c90 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -33,6 +33,7 @@ #include "sbcomp.hxx" #include "image.hxx" #include <limits> +#include <algorithm> #include <com/sun/star/script/ModuleType.hpp> // nInc is the increment size of the buffers @@ -243,7 +244,7 @@ void SbiCodeGen::Save() if( nPass == 1 ) aPropName = aPropName.Copy( aIfaceName.Len() + 1 ); SbProcedureProperty* pProcedureProperty = NULL; - OSL_TRACE("*** getProcedureProperty for thing %s", + OSL_TRACE("*** getProcedureProperty for thing %s", rtl::OUStringToOString( aPropName,RTL_TEXTENCODING_UTF8 ).getStr() ); pProcedureProperty = rMod.GetProcedureProperty( aPropName, ePropType ); } @@ -437,10 +438,7 @@ public: T result = 0 ; static const S max = std::numeric_limits< S >::max(); result = m_nNumOp0 + ( ( sizeof(S) + 1 ) * m_nNumSingleParams ) + ( (( sizeof(S) * 2 )+ 1 ) * m_nNumDoubleParams ); - if ( result > max ) - return max; - - return static_cast<S>(result); + return std::min(static_cast<T>(max), result); } virtual bool processParams(){ return false; } }; diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index 260ac341a46a..b5131c58dfaf 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -317,8 +317,7 @@ void SbiParser::OnGoto() UINT32 nLbl = 0; do { - SbiToken eTok2 = NIL; - eTok2 = Next(); // Label holen + Next(); // Label holen if( MayBeLabel() ) { UINT32 nOff = pProc->GetLabels().Reference( aSym ); |