Kaydet (Commit) 814ae45d authored tarafından Julien Nabet's avatar Julien Nabet

Some cppcheck cleaning

Change-Id: I099171d85a51095f0ff6d592c1260d931f9769b2
üst 03b941e9
......@@ -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);
......
......@@ -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;
......
......@@ -51,7 +51,7 @@ static String ImplGetSystemFileName( const String& rFileName )
// - BmpCreator -
// --------------
BmpCreator::BmpCreator()
BmpCreator::BmpCreator():pSRS(NULL)
{
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment