summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-04-26 13:30:18 +0000
committerHerbert Dürr <hdu@apache.org>2013-04-26 13:30:18 +0000
commit931f9852290ebb4671f66ef468b7db267ccd370d (patch)
tree2b72eb4c811c944ec7e560dd91303bd57443d666
parent7c2720aa57ce168f189362579fc7e9145ac491da (diff)
fix narrowing conversions in testtool
Notes
ignore: obsolete
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx6
-rw-r--r--testtools/source/bridgetest/cppobj.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index ad758f9fa17c..c0cecc981a11 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -639,11 +639,11 @@ static sal_Bool performTest(
sal_Int8 _arByte[] = { 1, 2, -1 };
sal_Int16 _arShort[] = { -0x8000, 1, 0x7FFF };
sal_uInt16 _arUShort[] = { 0 , 1, 0xFFFF };
- sal_Int32 _arLong[] = { 0x80000000, 1, 0x7FFFFFFF };
+ sal_Int32 _arLong[] = { -0x7FFFFFFF, 1, 0x7FFFFFFF };
sal_uInt32 _arULong[] = { 0, 1, 0xFFFFFFFF };
sal_Int64 _arHyper[] = {
- SAL_CONST_INT64(0x8000000000000000), 1,
- SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF) };
+ SAL_CONST_INT64(-0x7FFFFFFFFFFFFFFF), 1,
+ SAL_CONST_INT64(+0x7FFFFFFFFFFFFFFF) };
sal_uInt64 _arUHyper[] = { 0, 1, SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF) };
float _arFloat[] = { 1.1f, 2.2f, 3.3f };
double _arDouble[] = { 1.11, 2.22, 3.33 };
diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index 4e262d926ee7..7a38e45edf2a 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -486,7 +486,7 @@ Any Test_Impl::transportAny( const Any & value ) throw ( ::com::sun::star::uno::
//__________________________________________________________________________________________________
void Test_Impl::call( sal_Int32 nCallId , sal_Int32 nWaitMUSEC ) throw(::com::sun::star::uno::RuntimeException)
{
- TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 };
+ TimeValue value = { static_cast<unsigned>(nWaitMUSEC / 1000000), static_cast<unsigned>(nWaitMUSEC * 1000) };
osl_waitThread( &value );
if( m_bFirstCall )
{
@@ -502,7 +502,7 @@ void Test_Impl::call( sal_Int32 nCallId , sal_Int32 nWaitMUSEC ) throw(::com::su
//__________________________________________________________________________________________________
void Test_Impl::callOneway( sal_Int32 nCallId , sal_Int32 nWaitMUSEC ) throw (::com::sun::star::uno::RuntimeException)
{
- TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 };
+ TimeValue value = { static_cast<unsigned>(nWaitMUSEC / 1000000), static_cast<unsigned>(nWaitMUSEC * 1000) };
osl_waitThread( &value );
m_bSequenceOfCallTestPassed = m_bSequenceOfCallTestPassed && (nCallId > m_nLastCallId);
m_nLastCallId = nCallId;