Skip to content

Commit 0848cf4

Browse files
committed
Really fix the dummy implementations in cipher.c.
945083b wasn't enough to silence compiler warnings.
1 parent 8e59813 commit 0848cf4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/common/cipher.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121

2222
static void cipher_failure(void) pg_attribute_noreturn();
2323

24+
2425
PgCipherCtx *
2526
pg_cipher_ctx_create(int cipher, uint8 *key, int klen, bool enc)
2627
{
2728
cipher_failure();
29+
return NULL; /* keep compiler quiet */
2830
}
2931

3032
void
@@ -40,6 +42,7 @@ pg_cipher_encrypt(PgCipherCtx *ctx, const unsigned char *plaintext,
4042
unsigned char *outtag, const int taglen)
4143
{
4244
cipher_failure();
45+
return false; /* keep compiler quiet */
4346
}
4447

4548
bool
@@ -49,19 +52,19 @@ pg_cipher_decrypt(PgCipherCtx *ctx, const unsigned char *ciphertext,
4952
unsigned char *intag, const int taglen)
5053
{
5154
cipher_failure();
55+
return false; /* keep compiler quiet */
5256
}
5357

5458
static void
5559
cipher_failure(void)
5660
{
5761
#ifndef FRONTEND
5862
ereport(ERROR,
59-
(errcode(ERRCODE_CONFIG_FILE_ERROR),
60-
(errmsg("cluster file encryption is not supported because OpenSSL is not supported by this build"),
61-
errhint("Compile with --with-openssl to use this feature."))));
63+
(errcode(ERRCODE_CONFIG_FILE_ERROR),
64+
(errmsg("cluster file encryption is not supported because OpenSSL is not supported by this build"),
65+
errhint("Compile with --with-openssl to use this feature."))));
6266
#else
6367
fprintf(stderr, _("cluster file encryption is not supported because OpenSSL is not supported by this build"));
6468
exit(1);
6569
#endif
66-
}
67-
70+
}

0 commit comments

Comments
 (0)