Commit 6b41d642 authored by Tom Lane's avatar Tom Lane

Silence compiler warnings about incompatible function pointer types.

parent 7d4838dc
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.28 2006/07/13 04:15:25 neilc Exp $ * $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.29 2006/09/05 23:02:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
...@@ -154,11 +154,12 @@ static int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *res, unsigned int ...@@ -154,11 +154,12 @@ static int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *res, unsigned int
#include "sha2.c" #include "sha2.c"
#include "internal-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) static int compat_find_digest(const char *name, PX_MD **res)
{ {
init_f init = NULL; init_f init = NULL;
if (pg_strcasecmp(name, "sha224") == 0) if (pg_strcasecmp(name, "sha224") == 0)
init = init_sha224; init = init_sha224;
else if (pg_strcasecmp(name, "sha256") == 0) else if (pg_strcasecmp(name, "sha256") == 0)
...@@ -169,6 +170,7 @@ static int compat_find_digest(const char *name, PX_MD **res) ...@@ -169,6 +170,7 @@ static int compat_find_digest(const char *name, PX_MD **res)
init = init_sha512; init = init_sha512;
else else
return PXE_NO_HASH; return PXE_NO_HASH;
*res = px_alloc(sizeof(PX_MD)); *res = px_alloc(sizeof(PX_MD));
init(*res); init(*res);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment