summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2018-10-08 13:16:41 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2018-10-08 17:14:53 +0200
commita53e9b1d626a9f973d3bfc93a7d3e9341b0072ad (patch)
treedd84dcd7c3bafeb58897858931146abb2967767a /connectivity
parent5688cd1d9ad4500b82d2668cc5035da5c64acd0e (diff)
cppcheck: variableScope
Change-Id: I56b06b4c69bdb501535a43780b6a10d5ceb0c7da Reviewed-on: https://gerrit.libreoffice.org/61524 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx2
2 files changed, 2 insertions, 3 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index b50f9008c720..d22e2b7a0433 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -465,7 +465,6 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
// belonging to the primary key are in the result set, allow updateable result sets
// otherwise, don't
OUString table, schema;
- std::vector< OUString > sourceTableKeys;
std::vector< OString > vec;
tokenizeSQL( cmd, vec );
OUString sourceTable =
@@ -478,7 +477,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
OString aReason;
if( sourceTable.getLength() )
{
- sourceTableKeys = lookupKeys(
+ std::vector< OUString > sourceTableKeys = lookupKeys(
pSettings->tables.is() ?
pSettings->tables : data->tableSupplier->getTables() ,
sourceTable,
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index ca1211eaa438..fc602926e0ef 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -1084,10 +1084,10 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la
n +=2;
}
- std::vector< OString > names;
n ++;
if( vec[n].equalsIgnoreAsciiCase( "(" ) )
{
+ std::vector< OString> names;
// printf( "2\n" );
// extract names
n++;