From d586855e693aead022e13e2098cfb7faf3d25f58 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Mon, 19 Nov 2001 11:11:37 +0000 Subject: apr md5 and apr xlate have different APIs w.r.t. the buffers they operate on, so fix it up at the interface between them to avoid unnecessary warnings git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62519 13f79535-47bb-0310-9956-ffa450edef68 --- passwd/apr_md5.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'passwd') diff --git a/passwd/apr_md5.c b/passwd/apr_md5.c index e2fd57a60..5d7132b1b 100644 --- a/passwd/apr_md5.c +++ b/passwd/apr_md5.c @@ -272,8 +272,10 @@ APR_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context, if (inputLen >= partLen) { if (context->xlate) { inbytes_left = outbytes_left = partLen; - apr_xlate_conv_buffer(context->xlate, input, &inbytes_left, - &context->buffer[idx], &outbytes_left); + apr_xlate_conv_buffer(context->xlate, (const char *)input, + &inbytes_left, + (char *)&context->buffer[idx], + &outbytes_left); } else { memcpy(&context->buffer[idx], input, partLen); @@ -284,8 +286,9 @@ APR_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context, if (context->xlate) { unsigned char inp_tmp[64]; inbytes_left = outbytes_left = 64; - apr_xlate_conv_buffer(context->xlate, &input[i], &inbytes_left, - inp_tmp, &outbytes_left); + apr_xlate_conv_buffer(context->xlate, (const char *)&input[i], + &inbytes_left, (char *)inp_tmp, + &outbytes_left); MD5Transform(context->state, inp_tmp); } else { @@ -301,8 +304,9 @@ APR_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context, /* Buffer remaining input */ if (context->xlate) { inbytes_left = outbytes_left = inputLen - i; - apr_xlate_conv_buffer(context->xlate, &input[i], &inbytes_left, - &context->buffer[idx], &outbytes_left); + apr_xlate_conv_buffer(context->xlate, (const char *)&input[i], + &inbytes_left, (char *)&context->buffer[idx], + &outbytes_left); } else { memcpy(&context->buffer[idx], &input[i], inputLen - i); -- cgit v1.2.1