summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2022-04-08 22:14:24 +0000
committerTom Lane2022-04-08 22:14:24 +0000
commitc0d1c641cbe433d1b6304bc1e3a2d8cd38b9a8e5 (patch)
treec335fa30b139ffcbe568c0d0c126499882e2cb48
parent9a374b77fb53e4cfbca121e4fa278a7d71bde7c4 (diff)
Silence compiler warnings for unsupported compression methods.
wrasse, at least, moans about the lack of any "return" statement in these functions. You'd think pretty much everything would know that exit(1) doesn't return, but evidently not.
-rw-r--r--src/bin/pg_basebackup/bbstreamer_gzip.c2
-rw-r--r--src/bin/pg_basebackup/bbstreamer_lz4.c2
-rw-r--r--src/bin/pg_basebackup/bbstreamer_zstd.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/bbstreamer_gzip.c b/src/bin/pg_basebackup/bbstreamer_gzip.c
index d5b38ec4bc..1ab7ee6ea9 100644
--- a/src/bin/pg_basebackup/bbstreamer_gzip.c
+++ b/src/bin/pg_basebackup/bbstreamer_gzip.c
@@ -116,6 +116,7 @@ bbstreamer_gzip_writer_new(char *pathname, FILE *file,
return &streamer->base;
#else
pg_fatal("this build does not support gzip compression");
+ return NULL; /* keep compiler quiet */
#endif
}
@@ -248,6 +249,7 @@ bbstreamer_gzip_decompressor_new(bbstreamer *next)
return &streamer->base;
#else
pg_fatal("this build does not support gzip compression");
+ return NULL; /* keep compiler quiet */
#endif
}
diff --git a/src/bin/pg_basebackup/bbstreamer_lz4.c b/src/bin/pg_basebackup/bbstreamer_lz4.c
index 93f8344ea3..2f75ba5602 100644
--- a/src/bin/pg_basebackup/bbstreamer_lz4.c
+++ b/src/bin/pg_basebackup/bbstreamer_lz4.c
@@ -99,6 +99,7 @@ bbstreamer_lz4_compressor_new(bbstreamer *next, bc_specification *compress)
return &streamer->base;
#else
pg_fatal("this build does not support lz4 compression");
+ return NULL; /* keep compiler quiet */
#endif
}
@@ -296,6 +297,7 @@ bbstreamer_lz4_decompressor_new(bbstreamer *next)
return &streamer->base;
#else
pg_fatal("this build does not support lz4 compression");
+ return NULL; /* keep compiler quiet */
#endif
}
diff --git a/src/bin/pg_basebackup/bbstreamer_zstd.c b/src/bin/pg_basebackup/bbstreamer_zstd.c
index e2c76503cc..a5167e9fea 100644
--- a/src/bin/pg_basebackup/bbstreamer_zstd.c
+++ b/src/bin/pg_basebackup/bbstreamer_zstd.c
@@ -117,6 +117,7 @@ bbstreamer_zstd_compressor_new(bbstreamer *next, bc_specification *compress)
return &streamer->base;
#else
pg_fatal("this build does not support zstd compression");
+ return NULL; /* keep compiler quiet */
#endif
}
@@ -271,6 +272,7 @@ bbstreamer_zstd_decompressor_new(bbstreamer *next)
return &streamer->base;
#else
pg_fatal("this build does not support zstd compression");
+ return NULL; /* keep compiler quiet */
#endif
}