diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index b67ad5e..632d73c 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -2725,9 +2725,11 @@ readCommandResponse(CState *st, char *varprefix)
 
 	while (res != NULL)
 	{
+		bool is_last;
+
 		/* look now at the next result to know whether it is the last */
 		next_res = PQgetResult(st->con);
-		bool is_last = (next_res == NULL);
+		is_last = (next_res == NULL);
 
 		switch (PQresultStatus(res))
 		{
