From b38dfd0601cc4399903a50713dfab3d669da20ab Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Sun, 7 Sep 2014 12:50:41 +0100 Subject: [PATCH] Try to quieten some warnings for Mac OS X --- rtsp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rtsp.c b/rtsp.c index d364dc0a..5c587a56 100644 --- a/rtsp.c +++ b/rtsp.c @@ -751,23 +751,23 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) { #ifdef HAVE_LIBPOLARSSL md5_context tctx; md5_starts(&tctx); - md5_update(&tctx, username, strlen(username)); + md5_update(&tctx, (const unsigned char *)username, strlen(username)); md5_update(&tctx, (unsigned char *) ":", 1); - md5_update(&tctx, realm, strlen(realm)); + md5_update(&tctx, (const unsigned char *)realm, strlen(realm)); md5_update(&tctx, (unsigned char *) ":", 1); - md5_update(&tctx, config.password, strlen(config.password)); + md5_update(&tctx, (const unsigned char *)config.password, strlen(config.password)); md5_finish(&tctx,digest_urp); md5_starts(&tctx); - md5_update(&tctx, req->method, strlen(req->method)); + md5_update(&tctx, (const unsigned char *)req->method, strlen(req->method)); md5_update(&tctx, (unsigned char *) ":", 1); - md5_update(&tctx, uri, strlen(uri)); + md5_update(&tctx, (const unsigned char *)uri, strlen(uri)); md5_finish(&tctx,digest_mu); #endif int i; unsigned char buf[33]; for (i=0; i<16; i++) - sprintf(buf + 2*i, "%02X", digest_urp[i]); + sprintf((char *)buf + 2*i, "%02X", digest_urp[i]); #ifdef HAVE_LIBSSL MD5_Init(&ctx); @@ -786,18 +786,18 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) { md5_starts(&tctx); md5_update(&tctx, buf, 32); md5_update(&tctx, (unsigned char *) ":", 1); - md5_update(&tctx, *nonce, strlen(*nonce)); + md5_update(&tctx, (const unsigned char *)*nonce, strlen(*nonce)); md5_update(&tctx, (unsigned char *) ":", 1); for (i=0; i<16; i++) - sprintf(buf + 2*i, "%02X", digest_mu[i]); + sprintf((char *)buf + 2*i,"%02X", digest_mu[i]); md5_update(&tctx, buf, 32); md5_finish(&tctx,digest_total); #endif for (i=0; i<16; i++) - sprintf(buf + 2*i, "%02X", digest_total[i]); + sprintf((char *)buf + 2*i,"%02X", digest_total[i]); - if (!strcmp(response, buf)) + if (!strcmp(response, (const char *)buf)) return 0; warn("auth failed");