Fix more warnings (unused var, pointer types in md5.c)

- Use const void* in instead of unsigned char* in MD5_Update
   (same as in the openssl api, to avoid signed/unsigned char* warnings)
 - Add const to some pointers in md5.c


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2165 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.20
Stefan Bühler 15 years ago
parent 7b309ef770
commit e93cb224c1

@ -300,6 +300,8 @@ static int connection_handle_read_ssl(server *srv, connection *con) {
return 0;
#else
UNUSED(srv);
UNUSED(con);
return -1;
#endif
}

@ -52,9 +52,9 @@ documentation and/or software.
#define S43 15
#define S44 21
static void MD5Transform (UINT4 [4], unsigned char [64]);
static void MD5Transform (UINT4 [4], const unsigned char [64]);
static void Encode (unsigned char *, UINT4 *, unsigned int);
static void Decode (UINT4 *, unsigned char *, unsigned int);
static void Decode (UINT4 *, const unsigned char *, unsigned int);
#ifdef HAVE_MEMCPY
#define MD5_memcpy(output, input, len) memcpy((output), (input), (len))
@ -126,12 +126,13 @@ MD5_CTX *context; /* context */
operation, processing another message block, and updating the
context.
*/
void MD5_Update (context, input, inputLen)
void MD5_Update (context, _input, inputLen)
MD5_CTX *context; /* context */
unsigned char *input; /* input block */
const void *_input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, ndx, partLen;
const unsigned char *input = (const unsigned char*) _input;
/* Compute number of bytes mod 64 */
ndx = (unsigned int)((context->count[0] >> 3) & 0x3F);
@ -200,7 +201,7 @@ MD5_CTX *context; /* context */
*/
static void MD5Transform (state, block)
UINT4 state[4];
unsigned char block[64];
const unsigned char block[64];
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
@ -313,7 +314,7 @@ unsigned int len;
*/
static void Decode (output, input, len)
UINT4 *output;
unsigned char *input;
const unsigned char *input;
unsigned int len;
{
unsigned int i, j;

@ -42,6 +42,6 @@ typedef struct {
} MD5_CTX;
void MD5_Init (MD5_CTX *);
void MD5_Update (MD5_CTX *, unsigned char *, unsigned int);
void MD5_Update (MD5_CTX *, const void *, unsigned int);
void MD5_Final (unsigned char [16], MD5_CTX *);

@ -570,6 +570,8 @@ static int webdav_delete_file(server *srv, connection *con, plugin_data *p, phys
/* */
}
}
#else
UNUSED(p),
#endif
}
@ -730,6 +732,8 @@ static int webdav_copy_file(server *srv, connection *con, plugin_data *p, physic
}
}
}
#else
UNUSED(p);
#endif
return status;
}

Loading…
Cancel
Save