Really fix the dummy implementations in cipher.c.
authorTom Lane <[email protected]>
Fri, 25 Dec 2020 19:44:17 +0000 (14:44 -0500)
committerTom Lane <[email protected]>
Fri, 25 Dec 2020 19:45:24 +0000 (14:45 -0500)
945083b2f wasn't enough to silence compiler warnings.

src/common/cipher.c

index 393b062bc39149cac0031089bc4964f3fc97c85b..483cb610a3d996ae025cad779b53eb4a32e38bf5 100644 (file)
 
 static void cipher_failure(void) pg_attribute_noreturn();
 
+
 PgCipherCtx *
 pg_cipher_ctx_create(int cipher, uint8 *key, int klen, bool enc)
 {
    cipher_failure();
+   return NULL;                /* keep compiler quiet */
 }
 
 void
@@ -40,6 +42,7 @@ pg_cipher_encrypt(PgCipherCtx *ctx, const unsigned char *plaintext,
                  unsigned char *outtag, const int taglen)
 {
    cipher_failure();
+   return false;               /* keep compiler quiet */
 }
 
 bool
@@ -49,6 +52,7 @@ pg_cipher_decrypt(PgCipherCtx *ctx, const unsigned char *ciphertext,
                  unsigned char *intag, const int taglen)
 {
    cipher_failure();
+   return false;               /* keep compiler quiet */
 }
 
 static void
@@ -56,12 +60,11 @@ cipher_failure(void)
 {
 #ifndef FRONTEND
    ereport(ERROR,
-          (errcode(ERRCODE_CONFIG_FILE_ERROR),
-           (errmsg("cluster file encryption is not supported because OpenSSL is not supported by this build"),
-            errhint("Compile with --with-openssl to use this feature."))));
+           (errcode(ERRCODE_CONFIG_FILE_ERROR),
+            (errmsg("cluster file encryption is not supported because OpenSSL is not supported by this build"),
+             errhint("Compile with --with-openssl to use this feature."))));
 #else
    fprintf(stderr, _("cluster file encryption is not supported because OpenSSL is not supported by this build"));
    exit(1);
 #endif
-}  
-
+}