summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-01-22 14:26:33 +0000
committerCaolán McNamara <cmc@openoffice.org>2010-01-22 14:26:33 +0000
commitb6e7012e3348657b2f7d9fcfc3f39492bc9a6baa (patch)
tree5c6dc19cf266f66db041d26366bbfc007154c3a3 /automation
parente2d9dd6fb86e50b45f2e7e838b5b0cd230bebef4 (diff)
cmcfixes71: #i108577#: fix automation strict aliasing warnings
Diffstat (limited to 'automation')
-rw-r--r--automation/source/simplecm/simplecm.cxx4
-rw-r--r--automation/source/testtool/objtest.cxx12
-rw-r--r--automation/source/testtool/objtest.hxx2
3 files changed, 11 insertions, 7 deletions
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx
index 6813b4c9b2c7..0552374fde49 100644
--- a/automation/source/simplecm/simplecm.cxx
+++ b/automation/source/simplecm/simplecm.cxx
@@ -279,9 +279,9 @@ SvStream* SimpleCommunicationLinkViaSocket::GetBestCommunicationStream()
BOOL SimpleCommunicationLinkViaSocket::DoReceiveDataStream()
{
BOOL bWasError = FALSE;
- char* pBuffer = NULL;
+ void* pBuffer = NULL;
comm_UINT32 nLen;
- bWasError = pPacketHandler->ReceiveData( (void* &)pBuffer, nLen ) != C_ERROR_NONE;
+ bWasError = pPacketHandler->ReceiveData( pBuffer, nLen ) != C_ERROR_NONE;
if ( !bWasError )
{
pReceiveStream = GetBestCommunicationStream();
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index 84dc21a1321a..c45f075fdba3 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -886,7 +886,8 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
if ( !pUIds )
return;
pNewDef = new ControlDef("Active",SmartId(0));
- if (! pUIds->C40_PTR_INSERT(ControlItem, (ControlItem*&)pNewDef))
+ const ControlItem *pItem = pNewDef;
+ if (! pUIds->Insert(pItem))
{
ADD_WARNING_LOG2( GEN_RES_STR1c( S_DOUBLE_NAME, "Active" ), Filename, nLineNr );
delete pNewDef;
@@ -993,7 +994,8 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
OldTree = (ControlDef*)pNames->GetObject(nElement);
pNewDef = new ControlDef(aLongname,aShortname,OldTree,TRUE);
- if (! pNames->C40_PTR_INSERT(ControlItem, (ControlItem*&)pNewDef))
+ const ControlItem *pItem = pNewDef;
+ if (! pNames->Insert(pItem))
{
ADD_WARNING_LOG2( GEN_RES_STR1( S_DOUBLE_NAME, aLine ), Filename, nLineNr );
delete pNewDef;
@@ -1060,7 +1062,8 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B
}
}
- if (! pNames->C40_PTR_INSERT(ControlItem, (ControlItem*&)pNewDef))
+ const ControlItem *pItem = pNewDef;
+ if (! pNames->Insert(pItem))
{
ADD_WARNING_LOG2( GEN_RES_STR1( S_DOUBLE_NAME, aLine ), Filename, nLineNr );
delete pNewDef;
@@ -1535,7 +1538,8 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr
}
}
- if (! pNames->C40_PTR_INSERT(ControlItem, (ControlItem*&)pNewDef))
+ const ControlItem *pItem = pNewDef;
+ if (! pNames->Insert(pItem))
{
DBG_ERROR(" !!!! ACHTUNG !!!! Fehler beim einf�gen eines namens!");
delete pNewDef;
diff --git a/automation/source/testtool/objtest.hxx b/automation/source/testtool/objtest.hxx
index 260d54c0cef0..4727ca469d4d 100644
--- a/automation/source/testtool/objtest.hxx
+++ b/automation/source/testtool/objtest.hxx
@@ -139,7 +139,7 @@ DBG_DTOR(ControlItem,0);
SV_DECL_PTRARR_SORT_DEL(CNames, ControlItem*, 50, 10)
#define MK_SON_ACCESS( ClassName )\
- BOOL SonInsert( const ClassName *pNewEntry ) { return pSons->C40_PTR_INSERT( ControlItem, (ControlItem*&)pNewEntry ); }\
+ BOOL SonInsert( const ClassName *pNewEntry ) { const ControlItem *pItem = pNewEntry; return pSons->Insert( pItem ); }\
BOOL SonSeek_Entry( const ClassName *pSearchEntry, USHORT *nRes = NULL) { return pSons->Seek_Entry( pSearchEntry, nRes ); }\
ClassName* SonGetObject( USHORT nNr ) { return (ClassName*)pSons->GetObject( nNr ); }