git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6197db5)
Suppress compiler warning in libpq_pipeline.c.
2021年3月31日 19:30:04 +0000 (15:30 -0400)
2021年3月31日 19:30:04 +0000 (15:30 -0400)
Some compilers seem to be concerned about the possibility that
recv_step is not any of the defined enum values. Silence
warnings about uninitialized cmdtag in a different way than
I did in 9fb9691a8.


diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c
index 92af8698d69b9a077f2f1f00ad99fdce87a11769..6e136877047b9a46381cb236a73fc15b53626802 100644 (file)
--- a/src/test/modules/libpq_pipeline/libpq_pipeline.c
+++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c
@@ -646,7 +646,7 @@ test_pipelined_insert(PGconn *conn, int n_rows)
while (!PQisBusy(conn) && recv_step < BI_DONE)
{
PGresult *res;
- const char *cmdtag;
+ const char *cmdtag = "";
const char *description = "";
int status;
@@ -697,7 +697,6 @@ test_pipelined_insert(PGconn *conn, int n_rows)
case BI_DONE:
/* unreachable */
pg_fatal("unreachable state");
- cmdtag = NULL; /* keep compiler quiet */
}
if (PQresultStatus(res) != status)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /