[Libreoffice-commits] .: connectivity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 7 13:21:13 PST 2012
connectivity/source/drivers/ado/AColumn.cxx | 4 +---
connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx | 2 --
connectivity/source/drivers/ado/AGroup.cxx | 3 +--
connectivity/source/drivers/ado/Awrapado.cxx | 3 +--
connectivity/source/drivers/postgresql/pq_xcolumns.cxx | 4 +---
5 files changed, 4 insertions(+), 12 deletions(-)
New commits:
commit a99bf813c0079c26f2a2c940c3db8d8597e3047f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 7 22:18:49 2012 +0100
Some cppcheck cleaning
Change-Id: I5e8c768981dc6b8029bdc7eb8887562ccc18a5e2
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 4c4e4f2..ab50f2f 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -39,10 +39,8 @@ using namespace com::sun::star::sdbc;
void WpADOColumn::Create()
{
- HRESULT hr = -1;
-
_ADOColumn* pColumn = NULL;
- hr = CoCreateInstance(ADOS::CLSID_ADOCOLUMN_25,
+ HRESULT hr = CoCreateInstance(ADOS::CLSID_ADOCOLUMN_25,
NULL,
CLSCTX_INPROC_SERVER,
ADOS::IID_ADOCOLUMN_25,
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
index 61ec5d5..ed48af3 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
@@ -728,7 +728,6 @@ sal_Bool ODatabaseMetaDataResultSet::convertFastPropertyValue(
case PROPERTY_ID_RESULTSETCONCURRENCY:
case PROPERTY_ID_RESULTSETTYPE:
throw ::com::sun::star::lang::IllegalArgumentException();
- break;
case PROPERTY_ID_FETCHDIRECTION:
return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getFetchDirection());
case PROPERTY_ID_FETCHSIZE:
@@ -753,7 +752,6 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast(
case PROPERTY_ID_FETCHDIRECTION:
case PROPERTY_ID_FETCHSIZE:
throw Exception();
- break;
default:
OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!");
}
diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx
index a7192db..ea54a1f 100644
--- a/connectivity/source/drivers/ado/AGroup.cxx
+++ b/connectivity/source/drivers/ado/AGroup.cxx
@@ -37,9 +37,8 @@ using namespace com::sun::star::sdbcx;
// -------------------------------------------------------------------------
void WpADOGroup::Create()
{
- HRESULT hr = -1;
ADOGroup* pGroup = NULL;
- hr = CoCreateInstance(ADOS::CLSID_ADOGROUP_25,
+ HRESULT hr = CoCreateInstance(ADOS::CLSID_ADOGROUP_25,
NULL,
CLSCTX_INPROC_SERVER,
ADOS::IID_ADOGROUP_25,
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index 0853585..b0cb037 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -36,9 +36,8 @@ using namespace connectivity::ado;
void WpADOCatalog::Create()
{
- HRESULT hr = -1;
_ADOCatalog* pCommand;
- hr = CoCreateInstance(ADOS::CLSID_ADOCATALOG_25,
+ HRESULT hr = CoCreateInstance(ADOS::CLSID_ADOCATALOG_25,
NULL,
CLSCTX_INPROC_SERVER,
ADOS::IID_ADOCATALOG_25,
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index 7d34de2..e0bd4ad 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -119,9 +119,7 @@ static Any isCurrency( const rtl::OUString & typeName )
static Any isAutoIncrement( const rtl::OUString & defaultValue )
{
- sal_Bool ret = sal_False;
-
- ret = defaultValue.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "nextval(" ) );
+ sal_Bool ret = defaultValue.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "nextval(" ) );
// printf( "%s %d\n",
// OUStringToOString(defaultValue, RTL_TEXTENCODING_ASCII_US).getStr(),
// ret );
More information about the Libreoffice-commits
mailing list