Skip to content

Commit 7a94c65

Browse files
committed
src/md5.c: Address warning -Wold-style-definition
Symptom was: > md5.c: In function 'MD5Init': > md5.c:83:6: warning: old-style function definition [-Wold-style-definition] > 83 | void MD5Init (mdContext) > | ^~~~~~~ > md5.c: In function 'MD5Update': > md5.c:96:6: warning: old-style function definition [-Wold-style-definition] > 96 | void MD5Update (mdContext, inBuf, inLen) > | ^~~~~~~~~ > [..] > md5.c: In function 'MD5Final': > md5.c:131:6: warning: old-style function definition [-Wold-style-definition] > 131 | void MD5Final (mdContext, buf) > | ^~~~~~~~ > [..] > md5.c: In function 'MD5Sprint': > md5.c:175:6: warning: old-style function definition [-Wold-style-definition] > 175 | void MD5Sprint (mdContext, buf) > | ^~~~~~~~~ > md5.c: In function 'Transform': > md5.c:187:13: warning: old-style function definition [-Wold-style-definition] > 187 | static void Transform (buf, in) > | ^~~~~~~~~
1 parent d5e415e commit 7a94c65

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/md5.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ static unsigned char PADDING[64] = {
8080
(a) += (b); \
8181
}
8282

83-
void MD5Init (mdContext)
84-
MD5_CTX *mdContext;
83+
void MD5Init (MD5_CTX *mdContext)
8584
{
8685
mdContext->i[0] = mdContext->i[1] = (UINT4)0;
8786

@@ -93,10 +92,7 @@ MD5_CTX *mdContext;
9392
mdContext->buf[3] = (UINT4)0x10325476;
9493
}
9594

96-
void MD5Update (mdContext, inBuf, inLen)
97-
MD5_CTX *mdContext;
98-
const unsigned char *inBuf;
99-
unsigned int inLen;
95+
void MD5Update (MD5_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
10096
{
10197
UINT4 in[16];
10298
int mdi;
@@ -128,9 +124,7 @@ unsigned int inLen;
128124
}
129125
}
130126

131-
void MD5Final (mdContext, buf)
132-
MD5_CTX *mdContext;
133-
char *buf;
127+
void MD5Final (MD5_CTX *mdContext, char *buf)
134128
{
135129
UINT4 in[16];
136130
int mdi;
@@ -172,9 +166,7 @@ char *buf;
172166

173167
/* Print the context to the given buffer (32 digits)
174168
*/
175-
void MD5Sprint (mdContext, buf)
176-
MD5_CTX *mdContext;
177-
char *buf;
169+
void MD5Sprint (MD5_CTX *mdContext, char *buf)
178170
{
179171
int i;
180172

@@ -184,9 +176,7 @@ char *buf;
184176

185177
/* Basic MD5 step. Transform buf based on in.
186178
*/
187-
static void Transform (buf, in)
188-
UINT4 *buf;
189-
UINT4 *in;
179+
static void Transform (UINT4 *buf, UINT4 *in)
190180
{
191181
UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
192182

0 commit comments

Comments
 (0)