From 49eb02f07a5af44da59008a238e828b4a9532bef Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 4 Apr 2018 14:34:07 +0200 Subject: new loplugin:unusedvariablemore collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins Reviewed-by: Noel Grandin --- connectivity/source/drivers/mork/MConnection.cxx | 2 -- connectivity/source/drivers/postgresql/pq_tools.cxx | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'connectivity/source') diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx index 201fa7a9a7ad..076f120c2e16 100644 --- a/connectivity/source/drivers/mork/MConnection.cxx +++ b/connectivity/source/drivers/mork/MConnection.cxx @@ -67,7 +67,6 @@ void OConnection::construct(const OUString& url) // Get Scheme nLen = aAddrbookURI.indexOf(':'); OUString aAddrbookScheme; - OUString sAdditionalInfo; if ( nLen == -1 ) { // There isn't any subschema: - but could be just subschema @@ -84,7 +83,6 @@ void OConnection::construct(const OUString& url) else { aAddrbookScheme = aAddrbookURI.copy(0, nLen); - sAdditionalInfo = aAddrbookURI.copy( nLen + 1 ); } SAL_INFO("connectivity.mork", "URI = " << aAddrbookURI ); diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index 59377fe26324..46e66310cadb 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -1077,19 +1077,11 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la int n = 2; // printf( "1a\n" ); - // extract table name - OString tableName; + // skip table name if( vec[n+1].equalsIgnoreAsciiCase( "." ) ) { - tableName = vec[n]; - tableName += vec[n+1]; - tableName += vec[n+2]; n +=2; } - else - { - tableName = vec[n]; - } std::vector< OString > names; n ++; -- cgit