summaryrefslogtreecommitdiffstats
path: root/cppu
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-07-18 11:24:36 +0000
committerOliver Bolte <obo@openoffice.org>2007-07-18 11:24:36 +0000
commitdeb9e81e0024527d522eefd7fd688327a757006d (patch)
treeca5b8a332c40fed6c16a8344297e3b2835f0c4da /cppu
parentINTEGRATION: CWS unomacli64 (1.1.4); FILE ADDED (diff)
downloadcore-deb9e81e0024527d522eefd7fd688327a757006d.tar.gz
core-deb9e81e0024527d522eefd7fd688327a757006d.zip
INTEGRATION: CWS unomacli64 (1.3.36); FILE MERGED
2007/06/22 11:53:13 kr 1.3.36.1: fixed #i78114#: warnings, needed to use SAL_IMPLEMENT_MAIN for rtl_getApp funs
Diffstat (limited to 'cppu')
-rw-r--r--cppu/test/alignment/pass1.cxx29
1 files changed, 17 insertions, 12 deletions
diff --git a/cppu/test/alignment/pass1.cxx b/cppu/test/alignment/pass1.cxx
index 27419044a661..4f41d455f047 100644
--- a/cppu/test/alignment/pass1.cxx
+++ b/cppu/test/alignment/pass1.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: pass1.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 00:22:50 $
+ * last change: $Author: obo $ $Date: 2007-07-18 12:24:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -36,6 +36,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cppu.hxx"
+#include "sal/main.h"
+
#include <stdio.h>
#include <vector>
@@ -87,6 +89,8 @@ static void find_all_structs(
case RT_TYPE_STRUCT:
pNames->push_back( aReader.getTypeName().replace( '/', '.' ) );
break;
+ default:
+ break;
}
}
@@ -119,7 +123,7 @@ static OString makeCppName( OUString const & name ) SAL_THROW( () )
}
//==================================================================================================
-int SAL_CALL main( int, char const ** )
+SAL_IMPLEMENT_MAIN()
{
sal_Int32 argc = rtl_getAppCommandArgCount();
if (argc < 1)
@@ -172,8 +176,8 @@ int SAL_CALL main( int, char const ** )
if (bDumpStdOut)
{
// type name on stdout
- OString str( OSTR(name) );
- fprintf( stdout, "%s\n", str.getStr() );
+ OString str2( OSTR(name) );
+ fprintf( stdout, "%s\n", str2.getStr() );
}
// all includes
OString includeName( makeIncludeName( name ) );
@@ -182,8 +186,9 @@ int SAL_CALL main( int, char const ** )
// include diagnose.h
fprintf(
hPass2,
- "\n#include <diagnose.h>\n\n"
- "int SAL_CALL main( int argc, char const * argv[] )\n{\n" );
+ "\n#include <diagnose.h>\n"
+ "#include \"sal/main.h\"\n\n"
+ "SAL_IMPLEMENT_MAIN()\n{\n" );
// generate all type checks
for ( nPos = names.size(); nPos--; )
{
@@ -206,19 +211,19 @@ int SAL_CALL main( int, char const ** )
hPass2, "\tBINTEST_VERIFYALIGNMENT( %s, %d );\n",
cppName.getStr(), pTD->nAlignment );
// offset checks
- for ( sal_Int32 nPos = pCTD->nMembers; nPos--; )
+ for ( sal_Int32 nPos2 = pCTD->nMembers; nPos2--; )
{
- OString memberName( OSTR(pCTD->ppMemberNames[ nPos ]) );
+ OString memberName( OSTR(pCTD->ppMemberNames[ nPos2 ]) );
fprintf(
hPass2, "\tBINTEST_VERIFYOFFSET( %s, %s, %d );\n",
- cppName.getStr(), memberName.getStr(), pCTD->pMemberOffsets[ nPos ] );
+ cppName.getStr(), memberName.getStr(), pCTD->pMemberOffsets[ nPos2 ] );
}
typelib_typedescription_release( pTD );
}
else
{
- OString str( OSTR(name) );
- fprintf( stderr, "### cannot dump type %s!!!\n", str.getStr() );
+ OString str2( OSTR(name) );
+ fprintf( stderr, "### cannot dump type %s!!!\n", str2.getStr() );
}
}
fprintf(