aboutsummaryrefslogtreecommitdiff
path: root/src/test/modules/libpq_pipeline/libpq_pipeline.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-03-21 11:50:43 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-03-21 11:50:43 -0400
commit9fb9691a88ae8df9bc30e0f0f72de7c96e73e125 (patch)
tree0d198d8dc41536978c38d76fbcac184cb8e56b31 /src/test/modules/libpq_pipeline/libpq_pipeline.c
parent96ae658e6238c5e69819fb1557c2c14a555506d8 (diff)
downloadpostgresql-9fb9691a88ae8df9bc30e0f0f72de7c96e73e125.tar.gz
postgresql-9fb9691a88ae8df9bc30e0f0f72de7c96e73e125.zip
Suppress various new compiler warnings.
Compilers that don't understand that elog(ERROR) doesn't return issued warnings here. In the cases in libpq_pipeline.c, we were not exactly helping things by failing to mark pg_fatal() as noreturn. Per buildfarm.
Diffstat (limited to 'src/test/modules/libpq_pipeline/libpq_pipeline.c')
-rw-r--r--src/test/modules/libpq_pipeline/libpq_pipeline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c
index 03eb3df5042..846ee9f5ab0 100644
--- a/src/test/modules/libpq_pipeline/libpq_pipeline.c
+++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c
@@ -60,6 +60,7 @@ exit_nicely(PGconn *conn)
*/
#define pg_fatal(...) pg_fatal_impl(__LINE__, __VA_ARGS__)
static void
+pg_attribute_noreturn()
pg_fatal_impl(int line, const char *fmt,...)
{
va_list args;
@@ -570,6 +571,7 @@ test_pipelined_insert(PGconn *conn, int n_rows)
default:
pg_fatal("invalid state");
+ sql = NULL; /* keep compiler quiet */
}
pg_debug("sending: %s\n", sql);
@@ -679,8 +681,8 @@ test_pipelined_insert(PGconn *conn, int n_rows)
break;
case BI_DONE:
/* unreachable */
- description = "";
- abort();
+ pg_fatal("unreachable state");
+ cmdtag = NULL; /* keep compiler quiet */
}
if (PQresultStatus(res) != status)