Skip to content

Commit c0d1c64

Browse files
committed
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.
1 parent 9a374b7 commit c0d1c64

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/bin/pg_basebackup/bbstreamer_gzip.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ bbstreamer_gzip_writer_new(char *pathname, FILE *file,
116116
return &streamer->base;
117117
#else
118118
pg_fatal("this build does not support gzip compression");
119+
return NULL; /* keep compiler quiet */
119120
#endif
120121
}
121122

@@ -248,6 +249,7 @@ bbstreamer_gzip_decompressor_new(bbstreamer *next)
248249
return &streamer->base;
249250
#else
250251
pg_fatal("this build does not support gzip compression");
252+
return NULL; /* keep compiler quiet */
251253
#endif
252254
}
253255

src/bin/pg_basebackup/bbstreamer_lz4.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ bbstreamer_lz4_compressor_new(bbstreamer *next, bc_specification *compress)
9999
return &streamer->base;
100100
#else
101101
pg_fatal("this build does not support lz4 compression");
102+
return NULL; /* keep compiler quiet */
102103
#endif
103104
}
104105

@@ -296,6 +297,7 @@ bbstreamer_lz4_decompressor_new(bbstreamer *next)
296297
return &streamer->base;
297298
#else
298299
pg_fatal("this build does not support lz4 compression");
300+
return NULL; /* keep compiler quiet */
299301
#endif
300302
}
301303

src/bin/pg_basebackup/bbstreamer_zstd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ bbstreamer_zstd_compressor_new(bbstreamer *next, bc_specification *compress)
117117
return &streamer->base;
118118
#else
119119
pg_fatal("this build does not support zstd compression");
120+
return NULL; /* keep compiler quiet */
120121
#endif
121122
}
122123

@@ -271,6 +272,7 @@ bbstreamer_zstd_decompressor_new(bbstreamer *next)
271272
return &streamer->base;
272273
#else
273274
pg_fatal("this build does not support zstd compression");
275+
return NULL; /* keep compiler quiet */
274276
#endif
275277
}
276278

0 commit comments

Comments
 (0)