diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-02-13 15:08:01 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-02-13 15:08:20 +0100 |
commit | 814ae45d4b968c95a49fb35c47f4c813fa2dc026 (patch) | |
tree | 53a61f5a4093b8d28a81b3e5a16aa2c9f9089c1f | |
parent | 03b941e9ae63626a3336aabdb6a3485835ec6f9d (diff) |
Some cppcheck cleaning
Change-Id: I099171d85a51095f0ff6d592c1260d931f9769b2
-rw-r--r-- | extensions/test/ole/OleConverterVar1/smartarray.h | 3 | ||||
-rw-r--r-- | idlc/source/astscope.cxx | 3 | ||||
-rw-r--r-- | svtools/bmpmaker/bmpcore.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/test_ftpurl.cxx | 40 |
4 files changed, 29 insertions, 19 deletions
diff --git a/extensions/test/ole/OleConverterVar1/smartarray.h b/extensions/test/ole/OleConverterVar1/smartarray.h index 01b0e6941f5c..f50189241ec1 100644 --- a/extensions/test/ole/OleConverterVar1/smartarray.h +++ b/extensions/test/ole/OleConverterVar1/smartarray.h @@ -205,9 +205,6 @@ template <> SmartArray <IUnknown*>::SmartArray(sourceType * parParams, int count { ATLTRACE("SmartArray<IUnknown>"); HRESULT hr= S_OK; - SAFEARRAYBOUND rgsabound[1]; - rgsabound[0].cElements= count; - rgsabound[0].lLbound= 0; m_array= SafeArrayCreateVector( VT_UNKNOWN, 0, count); SafeArrayLock( m_array); diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index 3d26b3a1182f..1c0d4fd84101 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -259,7 +259,6 @@ AstDeclaration* AstScope::lookupPrimitiveType(ExprType type) { AstDeclaration* pDecl = NULL; AstScope* pScope = NULL; - AstBaseType* pBaseType = NULL; OString typeName; pDecl = scopeAsDecl(this); if ( !pDecl ) @@ -324,7 +323,7 @@ AstDeclaration* AstScope::lookupPrimitiveType(ExprType type) if ( pDecl && (pDecl->getNodeType() == NT_predefined) ) { - pBaseType = (AstBaseType*)pDecl; + AstBaseType* pBaseType = (AstBaseType*)pDecl; if ( pBaseType->getExprType() == type ) return pDecl; diff --git a/svtools/bmpmaker/bmpcore.cxx b/svtools/bmpmaker/bmpcore.cxx index f5366ffe1bbf..50ae2933086d 100644 --- a/svtools/bmpmaker/bmpcore.cxx +++ b/svtools/bmpmaker/bmpcore.cxx @@ -51,7 +51,7 @@ static String ImplGetSystemFileName( const String& rFileName ) // - BmpCreator - // -------------- -BmpCreator::BmpCreator() +BmpCreator::BmpCreator():pSRS(NULL) { } diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx index bb9fa020e865..d37ce9069386 100644 --- a/ucb/source/ucp/ftp/test_ftpurl.cxx +++ b/ucb/source/ucp/ftp/test_ftpurl.cxx @@ -25,12 +25,6 @@ #include "debughelper.hxx" #include <vector> -#define TESTEVAL \ - if(number_of_errors) \ - fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); \ - return number_of_errors - - struct ServerInfo { rtl::OUString host; rtl::OUString port; @@ -138,7 +132,11 @@ int test_ftpurl(void) { ascii = "ftp://host/bla/../../test/", n = "anonymous", p = ""; TESTURL; - TESTEVAL; + if(number_of_errors) + { + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } @@ -161,7 +159,11 @@ int test_ftplist(void) { if(!(vec[0].m_aName == "dir1" && vec[1].m_aName == "dir2" && vec[2].m_aName == "file1" )) ++number_of_errors; - TESTEVAL; + if(number_of_errors) + { + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } @@ -202,13 +204,16 @@ int test_ftpparent(void) { expect = "ftp://abi:psswd@abi-1/.."; TESTPARENT; - TESTEVAL; + if(number_of_errors) + { + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } int test_ftpproperties(void) { int number_of_errors = 0; - const char* name = "test_ftpproperties"; FTPHandleProviderI provider; ftp::FTPURL url( @@ -220,14 +225,18 @@ int test_ftpproperties(void) { if(!(ade.m_aName == "file" && ade.isFile())) ++number_of_errors; - TESTEVAL; + if(number_of_errors) + { + const char* name = "test_ftpproperties"; + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } int test_ftpopen(void) { int number_of_errors = 0; - const char* name = "test_ftpopen"; FTPHandleProviderI provider; ftp::FTPURL url( @@ -258,7 +267,12 @@ int test_ftpopen(void) } else ++number_of_errors; - TESTEVAL; + if(number_of_errors) + { + const char* name = "test_ftpopen"; + fprintf(stderr,"errors in %s: %d\n",name,number_of_errors); + } + return number_of_errors; } |