summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDavid Rowley2022-08-25 14:35:40 +0000
committerDavid Rowley2022-08-25 14:35:40 +0000
commit3e0fff2e6888e39b0ad5cdfdb78bc1c2bb2b22c9 (patch)
tree235e23ee1c87eb2f148216535c0d300bcbe0a64e /src/bin
parente3ce2de09d814f8770b2e3b3c152b7671bcdb83f (diff)
More -Wshadow=compatible-local warning fixes
In a similar effort to f01592f91, here we're targetting fixing the warnings where we've deemed the shadowing variable to serve a close enough purpose to the shadowed variable just to reuse the shadowed version and not declare the shadowing variable at all. By my count, this takes the warning count from 106 down to 71. Author: Justin Pryzby Discussion: https://postgr.es/m/20220825020839.GT2342@telsasoft.com
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pgbench/pgbench.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index c0e907d437..07b7e0cf37 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3109,7 +3109,6 @@ sendCommand(CState *st, Command *command)
for (j = 0; commands[j] != NULL; j++)
{
PGresult *res;
- char name[MAX_PREPARE_NAME];
if (commands[j]->type != SQL_COMMAND)
continue;
@@ -3803,8 +3802,6 @@ advanceConnectionState(TState *thread, CState *st, StatsData *agg)
/* quickly skip commands until something to do... */
while (true)
{
- Command *command;
-
command = sql_script[st->use_file].commands[st->command];
/* cannot reach end of script in that state */
@@ -3959,8 +3956,6 @@ advanceConnectionState(TState *thread, CState *st, StatsData *agg)
*/
if (report_per_command)
{
- Command *command;
-
pg_time_now_lazy(&now);
command = sql_script[st->use_file].commands[st->command];