summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/comp/codegen.cxx8
-rw-r--r--basic/source/comp/loops.cxx3
-rw-r--r--connectivity/source/drivers/adabas/BConnection.cxx2
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx1
4 files changed, 5 insertions, 9 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 );
diff --git a/connectivity/source/drivers/adabas/BConnection.cxx b/connectivity/source/drivers/adabas/BConnection.cxx
index a594083f6e75..4fd2432c6837 100644
--- a/connectivity/source/drivers/adabas/BConnection.cxx
+++ b/connectivity/source/drivers/adabas/BConnection.cxx
@@ -141,7 +141,7 @@ SQLRETURN OAdabasConnection::openConnectionWithAuth(const ::rtl::OUString& aConn
- N3SQLSetConnectAttr(m_aConnectionHandle,SQL_ATTR_LOGIN_TIMEOUT,(SQLPOINTER)nTimeOut,SQL_IS_INTEGER);
+ N3SQLSetConnectAttr(m_aConnectionHandle,SQL_ATTR_LOGIN_TIMEOUT,(SQLPOINTER)(sal_IntPtr)nTimeOut,SQL_IS_INTEGER);
// Verbindung aufbauen
nSQLRETURN = N3SQLConnect(m_aConnectionHandle,
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 1782b2e38ccc..e2312e0dcaf6 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -449,7 +449,6 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
Reference< XIndexContainer > xCols(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
Reference< XGridColumnFactory > xFactory(xCols, UNO_QUERY);
- Point aPos = OutputToScreenPixel(m_pImpl->aDropPosPixel);
sal_uInt16 nColId = GetItemId(m_pImpl->aDropPosPixel);
// EinfuegePosition, immer vor der aktuellen Spalte
sal_uInt16 nPos = GetModelColumnPos(nColId);