From 47a13ae88cec7a03ab2ba5511549ce877cef4516 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 17 Apr 2023 11:40:18 +0200 Subject: [PATCH] md5: fix old-style function definitions This fixes -Wdeprecated-non-prototype clang warnings. Reported-by: Bryan Christianson --- md5.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/md5.c b/md5.c index f997a6e..b8eeda3 100644 --- a/md5.c +++ b/md5.c @@ -117,8 +117,7 @@ inline UINT4 ROTATE_LEFT(UINT4 x, int n) /* The routine MD5Init initializes the message-digest context mdContext. All fields are set to zero. */ -void MD5Init (mdContext) -MD5_CTX *mdContext; +void MD5Init (MD5_CTX *mdContext) { mdContext->i[0] = mdContext->i[1] = (UINT4)0; @@ -134,10 +133,7 @@ MD5_CTX *mdContext; account for the presence of each of the characters inBuf[0..inLen-1] in the message whose digest is being computed. */ -void MD5Update (mdContext, inBuf, inLen) -MD5_CTX *mdContext; -unsigned const char *inBuf; -unsigned int inLen; +void MD5Update (MD5_CTX *mdContext, unsigned const char *inBuf, unsigned int inLen) { UINT4 in[16]; int mdi; @@ -173,8 +169,7 @@ unsigned int inLen; ends with the desired message digest in mdContext->digest[0...15]. */ -void MD5Final (mdContext) -MD5_CTX *mdContext; +void MD5Final (MD5_CTX *mdContext) { UINT4 in[16]; int mdi; @@ -214,9 +209,7 @@ MD5_CTX *mdContext; /* Basic MD5 step. Transforms buf based on in. */ -static void Transform (buf, in) -UINT4 *buf; -UINT4 *in; +static void Transform (UINT4 *buf, UINT4 *in) { UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];