[Libreoffice-commits] core.git: connectivity/source

Julien Nabet serval2412 at yahoo.fr
Wed Jun 12 13:53:33 PDT 2013


 connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 4e5b78d6a54fa7fac1c6e09401b2e05fa5c06579
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Jun 12 22:52:44 2013 +0200

    cppcheck: fix Variable "hr" reassignment
    
    Change-Id: Iafaac91fe3783118817d40f3831e5ca039be64e0

diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
index 8b91a62..1fa5f97 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
@@ -391,10 +391,8 @@ RightsEnum OAdoGroup::Map2Right(sal_Int32 _eNum)
 // -------------------------------------------------------------------------
 void WpADOIndex::Create()
 {
-    HRESULT         hr = -1;
-
     _ADOIndex* pIndex = NULL;
-    hr = CoCreateInstance(ADOS::CLSID_ADOINDEX_25,
+    HRESULT hr = CoCreateInstance(ADOS::CLSID_ADOINDEX_25,
                           NULL,
                           CLSCTX_INPROC_SERVER,
                           ADOS::IID_ADOINDEX_25,
@@ -421,9 +419,8 @@ void OAdoIndex::fillPropertyValues()
 // -----------------------------------------------------------------------------
 void WpADOKey::Create()
 {
-    HRESULT         hr = -1;
     _ADOKey* pKey = NULL;
-    hr = CoCreateInstance(ADOS::CLSID_ADOKEY_25,
+    HRESULT hr = CoCreateInstance(ADOS::CLSID_ADOKEY_25,
                           NULL,
                           CLSCTX_INPROC_SERVER,
                           ADOS::IID_ADOKEY_25,
@@ -531,9 +528,8 @@ KeyTypeEnum OAdoKey::Map2KeyRule(const sal_Int32& _eNum)
 // -----------------------------------------------------------------------------
 void WpADOTable::Create()
 {
-    HRESULT         hr = -1;
     _ADOTable* pTable = NULL;
-    hr = CoCreateInstance(ADOS::CLSID_ADOTABLE_25,
+    HRESULT hr = CoCreateInstance(ADOS::CLSID_ADOTABLE_25,
                           NULL,
                           CLSCTX_INPROC_SERVER,
                           ADOS::IID_ADOTABLE_25,
@@ -578,9 +574,8 @@ void OAdoTable::fillPropertyValues()
 // -----------------------------------------------------------------------------
 void WpADOUser::Create()
 {
-    HRESULT         hr = -1;
     _ADOUser* pUser = NULL;
-    hr = CoCreateInstance(ADOS::CLSID_ADOUSER_25,
+    HRESULT hr = CoCreateInstance(ADOS::CLSID_ADOUSER_25,
                           NULL,
                           CLSCTX_INPROC_SERVER,
                           ADOS::IID_ADOUSER_25,


More information about the Libreoffice-commits mailing list