summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2006-09-05 23:02:28 +0000
committerTom Lane2006-09-05 23:02:28 +0000
commitd76941ad1bd2c49f9131a1baf0e1a93657dedbe3 (patch)
tree894feb042b05c99ecad066b890ac045381d41a34
parent8043297274c49213c5731519b5c2b31497368bf6 (diff)
Silence compiler warnings about incompatible function pointer types.
-rw-r--r--contrib/pgcrypto/openssl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/pgcrypto/openssl.c b/contrib/pgcrypto/openssl.c
index adefd508a2..1593ff26ab 100644
--- a/contrib/pgcrypto/openssl.c
+++ b/contrib/pgcrypto/openssl.c
@@ -154,11 +154,12 @@ static int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *res, unsigned int
#include "sha2.c"
#include "internal-sha2.c"
-typedef int (*init_f)(PX_MD *md);
+typedef void (*init_f)(PX_MD *md);
static int compat_find_digest(const char *name, PX_MD **res)
{
init_f init = NULL;
+
if (pg_strcasecmp(name, "sha224") == 0)
init = init_sha224;
else if (pg_strcasecmp(name, "sha256") == 0)
@@ -169,6 +170,7 @@ static int compat_find_digest(const char *name, PX_MD **res)
init = init_sha512;
else
return PXE_NO_HASH;
+
*res = px_alloc(sizeof(PX_MD));
init(*res);
return 0;