mtd: fix building with GCC 15.1
Convert old style declarations to modern ones. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18600 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
a6ab705ab8
commit
090add1e87
2 changed files with 8 additions and 16 deletions
|
@ -48,7 +48,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* forward declaration */
|
/* forward declaration */
|
||||||
static void Transform ();
|
static void Transform (UINT4 *buf, UINT4 *in);
|
||||||
|
|
||||||
static unsigned char PADDING[64] = {
|
static unsigned char PADDING[64] = {
|
||||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
@ -102,8 +102,7 @@ static unsigned char PADDING[64] = {
|
||||||
/* The routine MD5_Init initializes the message-digest context
|
/* The routine MD5_Init initializes the message-digest context
|
||||||
mdContext. All fields are set to zero.
|
mdContext. All fields are set to zero.
|
||||||
*/
|
*/
|
||||||
void MD5_Init (mdContext)
|
void MD5_Init (MD5_CTX *mdContext)
|
||||||
MD5_CTX *mdContext;
|
|
||||||
{
|
{
|
||||||
mdContext->i[0] = mdContext->i[1] = (UINT4)0;
|
mdContext->i[0] = mdContext->i[1] = (UINT4)0;
|
||||||
|
|
||||||
|
@ -119,10 +118,7 @@ MD5_CTX *mdContext;
|
||||||
account for the presence of each of the characters inBuf[0..inLen-1]
|
account for the presence of each of the characters inBuf[0..inLen-1]
|
||||||
in the message whose digest is being computed.
|
in the message whose digest is being computed.
|
||||||
*/
|
*/
|
||||||
void MD5_Update (mdContext, inBuf, inLen)
|
void MD5_Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen)
|
||||||
MD5_CTX *mdContext;
|
|
||||||
unsigned char *inBuf;
|
|
||||||
unsigned int inLen;
|
|
||||||
{
|
{
|
||||||
UINT4 in[16];
|
UINT4 in[16];
|
||||||
int mdi;
|
int mdi;
|
||||||
|
@ -157,9 +153,7 @@ unsigned int inLen;
|
||||||
/* The routine MD5Final terminates the message-digest computation and
|
/* The routine MD5Final terminates the message-digest computation and
|
||||||
ends with the desired message digest in mdContext->digest[0...15].
|
ends with the desired message digest in mdContext->digest[0...15].
|
||||||
*/
|
*/
|
||||||
void MD5_Final (hash, mdContext)
|
void MD5_Final (unsigned char hash[], MD5_CTX *mdContext)
|
||||||
unsigned char hash[];
|
|
||||||
MD5_CTX *mdContext;
|
|
||||||
{
|
{
|
||||||
UINT4 in[16];
|
UINT4 in[16];
|
||||||
int mdi;
|
int mdi;
|
||||||
|
@ -200,9 +194,7 @@ MD5_CTX *mdContext;
|
||||||
|
|
||||||
/* Basic MD5 step. Transforms buf based on in.
|
/* Basic MD5 step. Transforms buf based on in.
|
||||||
*/
|
*/
|
||||||
static void Transform (buf, in)
|
static void Transform (UINT4 *buf, UINT4 *in)
|
||||||
UINT4 *buf;
|
|
||||||
UINT4 *in;
|
|
||||||
{
|
{
|
||||||
UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
|
UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ typedef struct {
|
||||||
unsigned char digest[16]; /* actual digest after MD5Final call */
|
unsigned char digest[16]; /* actual digest after MD5Final call */
|
||||||
} MD5_CTX;
|
} MD5_CTX;
|
||||||
|
|
||||||
void MD5_Init ();
|
void MD5_Init (MD5_CTX *mdContext);
|
||||||
void MD5_Update ();
|
void MD5_Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);
|
||||||
void MD5_Final ();
|
void MD5_Final (unsigned char hash[], MD5_CTX *mdContext);
|
||||||
|
|
||||||
#define __MD5_INCLUDE__
|
#define __MD5_INCLUDE__
|
||||||
#endif /* __MD5_INCLUDE__ */
|
#endif /* __MD5_INCLUDE__ */
|
||||||
|
|
Loading…
Reference in a new issue