Fix compilation warnings in cryptohash_openssl.c
authorMichael Paquier <[email protected]>
Wed, 2 Dec 2020 03:31:10 +0000 (12:31 +0900)
committerMichael Paquier <[email protected]>
Wed, 2 Dec 2020 03:31:10 +0000 (12:31 +0900)
These showed up with -O2.  Oversight in 87ae969.

Author: Fujii Masao
Discussion: https://postgr.es/m/cee3df00-566a-400c-1252-67c3701f918a@oss.nttdata.com

src/common/cryptohash_openssl.c

index 8e2c69b48bbaca982ceaaa03b8a324d8bd59c9ff..33f17cac33da16f7db21735872890d2aecd9c6ad 100644 (file)
@@ -119,7 +119,7 @@ pg_cryptohash_init(pg_cryptohash_ctx *ctx)
 int
 pg_cryptohash_update(pg_cryptohash_ctx *ctx, const uint8 *data, size_t len)
 {
-   int         status;
+   int         status = 0;
 
    if (ctx == NULL)
        return 0;
@@ -154,7 +154,7 @@ pg_cryptohash_update(pg_cryptohash_ctx *ctx, const uint8 *data, size_t len)
 int
 pg_cryptohash_final(pg_cryptohash_ctx *ctx, uint8 *dest)
 {
-   int         status;
+   int         status = 0;
 
    if (ctx == NULL)
        return 0;