[Libreoffice-commits] core.git: extensions/test idlc/source svtools/bmpmaker ucb/source

Julien Nabet serval2412 at yahoo.fr
Wed Feb 13 06:10:18 PST 2013


 extensions/test/ole/OleConverterVar1/smartarray.h |    3 -
 idlc/source/astscope.cxx                          |    3 -
 svtools/bmpmaker/bmpcore.cxx                      |    2 -
 ucb/source/ucp/ftp/test_ftpurl.cxx                |   40 ++++++++++++++--------
 4 files changed, 29 insertions(+), 19 deletions(-)

New commits:
commit 814ae45d4b968c95a49fb35c47f4c813fa2dc026
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 15:08:01 2013 +0100

    Some cppcheck cleaning
    
    Change-Id: I099171d85a51095f0ff6d592c1260d931f9769b2

diff --git a/extensions/test/ole/OleConverterVar1/smartarray.h b/extensions/test/ole/OleConverterVar1/smartarray.h
index 01b0e69..f501892 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 3d26b3a..1c0d4fd 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 f5366ff..50ae293 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 bb9fa02..d37ce90 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;
 }
 
 


More information about the Libreoffice-commits mailing list