From 14c10b9c76aa41a64ef39acf19112d5fb7ac4588 Mon Sep 17 00:00:00 2001
From: Jens-Heiner Rechtien
Date: Mon, 19 Jun 2006 22:12:56 +0000
Subject: [PATCH] INTEGRATION: CWS warnings01 (1.14.22); FILE MERGED 2006/04/07
19:41:28 sb 1.14.22.4: RESYNC: (1.14-1.15); FILE MERGED 2006/03/01 15:48:44
sb 1.14.22.3: #i53898# Made code waring-free. 2005/10/31 16:16:22 sb
1.14.22.2: #i53898# Made code warning-free. 2005/09/20 07:27:01 sb 1.14.22.1:
#i53898# Made code warning-free.
---
testtools/source/bridgetest/bridgetest.cxx | 49 +++++++---------------
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 5202b8e81107..b7f0792f54a8 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -1,7 +1,7 @@
/**************************************************************************
#*
-#* last change $Author: hr $ $Date: 2006-01-26 17:39:56 $
-#* $Revision: 1.15 $
+#* last change $Author: hr $ $Date: 2006-06-19 23:12:56 $
+#* $Revision: 1.16 $
#*
#* $Logfile: $
#*
@@ -67,7 +67,7 @@ inline static Sequence< OUString > getSupportedServiceNames()
return Sequence< OUString >( &aName, 1 );
}
-static sal_Bool check( sal_Bool b , char * message )
+static bool check( bool b , char const * message )
{
if ( ! b )
fprintf( stderr, "%s failed\n" , message );
@@ -193,23 +193,6 @@ static void assign( TestElement & rData,
rData.Interface = xTest;
rData.Any = rAny;
}
-//==================================================================================================
-static void assign( TestData & rData,
- sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- TestEnum eEnum, const ::rtl::OUString& rStr,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- const ::com::sun::star::uno::Any& rAny,
- const com::sun::star::uno::Sequence< TestElement >& rSequence )
-{
- assign( (TestElement &)rData,
- bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny );
- rData.Sequence = rSequence;
-}
namespace {
@@ -409,7 +392,7 @@ static sal_Bool performTest(
const Reference & xLBT )
{
check( xLBT.is(), "### no test interface!" );
- sal_Bool bRet = sal_True;
+ bool bRet = true;
if (xLBT.is())
{
// this data is never ever granted access to by calls other than equals(), assign()!
@@ -631,8 +614,8 @@ static sal_Bool performTest(
// create the sequence which are compared with the results
sal_Bool _arBool[] = {sal_True, sal_False, sal_True};
sal_Unicode _arChar[] = {0x0065, 0x0066, 0x0067};
- sal_Int8 _arByte[] = { (sal_Int8)1, (sal_Int8) 2, (sal_Int8) 0xff};
- sal_Int16 _arShort[] = {(sal_Int16) 0x8000,(sal_Int16) 1, (sal_Int16) 0xefff};
+ 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_uInt32 _arULong[] = {0, 1, 0xffffffff};
@@ -683,6 +666,7 @@ static sal_Bool performTest(
TestEnum_CHECK, OUSTR(STRING_TEST_CONSTANT), _arObj[2],
Any( &_arObj[2], ::getCppuType( (const Reference *)0 ) ) );
+ {
Sequence arBool(_arBool, 3);
Sequence arChar( _arChar, 3);
Sequence arByte(_arByte, 3);
@@ -710,8 +694,8 @@ static sal_Bool performTest(
_arSeqLong2[j] = Sequence< Sequence > (_arSeqLong, 3);
}
+
Sequence > > arLong3( _arSeqLong2, 3);
- {
Sequence > seqSeqRet = xBT2->setDim2(arLong3[0]);
bRet = check( seqSeqRet == arLong3[0], "sequence test") && bRet;
Sequence > > seqSeqRet2 = xBT2->setDim3(arLong3);
@@ -748,8 +732,7 @@ static sal_Bool performTest(
bRet = check( seqStringRet == arString, "sequence test") && bRet;
Sequence seqStructRet = xBT2->setSequenceStruct(arStruct);
bRet = check( seqStructRet == arStruct, "sequence test") && bRet;
- }
- {
+
Sequence arBoolTemp = cloneSequence(arBool);
Sequence arCharTemp = cloneSequence(arChar);
Sequence arByteTemp = cloneSequence(arByte);
@@ -1032,8 +1015,9 @@ uno_Sequence* cloneSequence(const uno_Sequence* val, const Type& type)
break;
}
default:
- uno_type_sequence_construct( & retSeq, type.getTypeLibType(),
- (void*) val->elements, val->nElements, cpp_acquire);
+ uno_type_sequence_construct(
+ &retSeq, type.getTypeLibType(), (void*) val->elements,
+ val->nElements, reinterpret_cast< uno_AcquireFunc >(cpp_acquire));
break;
}
delete[] buf;
@@ -1048,7 +1032,7 @@ Sequence cloneSequence(const Sequence& val)
}
template< class T >
-static inline bool makeSurrogate(
+inline bool makeSurrogate(
Reference< T > & rOut, Reference< T > const & rOriginal )
{
rOut.clear();
@@ -1233,13 +1217,12 @@ extern "C"
{
//==================================================================================================
void SAL_CALL component_getImplementationEnvironment(
- const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+ const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
+sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey )
{
if (pRegistryKey)
{
@@ -1261,7 +1244,7 @@ sal_Bool SAL_CALL component_writeInfo(
}
//==================================================================================================
void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+ const sal_Char * pImplName, void * pServiceManager, void * )
{
void * pRet = 0;