]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
md5: fix old-style function definitions
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 17 Apr 2023 09:40:18 +0000 (11:40 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 17 Apr 2023 09:40:18 +0000 (11:40 +0200)
This fixes -Wdeprecated-non-prototype clang warnings.

Reported-by: Bryan Christianson <bryan@whatroute.net>
md5.c

diff --git a/md5.c b/md5.c
index f997a6ec1ce342c18db01da2ad45b5c3209ca510..b8eeda3876117466673379941204c0933005a673 100644 (file)
--- 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];