From 2938f629601f0f759b99144d583fc9c0b9f66782 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 29 Jan 2011 17:12:46 +0000 Subject: WaE: various new gcc 4.6.0 warnings --- basic/source/comp/codegen.cxx | 8 +++----- basic/source/comp/loops.cxx | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'basic') 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 +#include #include // 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(result); + return std::min(static_cast(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 ); -- cgit