Skip to content

Commit 6b41d64

Browse files
committed
Silence compiler warnings about incompatible function pointer types.
1 parent 7d4838d commit 6b41d64

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/pgcrypto/openssl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.28 2006/07/13 04:15:25 neilc Exp $
29+
* $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.29 2006/09/05 23:02:28 tgl Exp $
3030
*/
3131

3232
#include "postgres.h"
@@ -154,11 +154,12 @@ static int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *res, unsigned int
154154
#include "sha2.c"
155155
#include "internal-sha2.c"
156156

157-
typedef int (*init_f)(PX_MD *md);
157+
typedef void (*init_f)(PX_MD *md);
158158

159159
static int compat_find_digest(const char *name, PX_MD **res)
160160
{
161161
init_f init = NULL;
162+
162163
if (pg_strcasecmp(name, "sha224") == 0)
163164
init = init_sha224;
164165
else if (pg_strcasecmp(name, "sha256") == 0)
@@ -169,6 +170,7 @@ static int compat_find_digest(const char *name, PX_MD **res)
169170
init = init_sha512;
170171
else
171172
return PXE_NO_HASH;
173+
172174
*res = px_alloc(sizeof(PX_MD));
173175
init(*res);
174176
return 0;

0 commit comments

Comments
 (0)