Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0d1c64

Browse files
committed
Silence compiler warnings for unsupported compression methods.
wrasse, at least, moans about the lack of any "return" statementin these functions. You'd think pretty much everything wouldknow that exit(1) doesn't return, but evidently not.
1 parent9a374b7 commitc0d1c64

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+
returnNULL;/* 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+
returnNULL;/* 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+
returnNULL;/* 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+
returnNULL;/* 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+
returnNULL;/* 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+
returnNULL;/* keep compiler quiet */
274276
#endif
275277
}
276278

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp