From 8a72b7d228ee18873fef392bd4ef4a97da4195e8 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Fri, 19 Apr 2013 22:41:21 -0400 Subject: [PATCH] Silence compiler warning about discarding const By declaring str as "char *" rather than "const char *", then casting the result of osrfArrayGetString to (char *), we make the compiler happier. Signed-off-by: Dan Scott --- src/gateway/osrf_http_translator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gateway/osrf_http_translator.c b/src/gateway/osrf_http_translator.c index f829fa0..166d111 100644 --- a/src/gateway/osrf_http_translator.c +++ b/src/gateway/osrf_http_translator.c @@ -276,9 +276,9 @@ static char* osrfHttpTranslatorParseRequest(osrfHttpTranslator* trans) { const jsonObject* obj = NULL; int i = 0; - const char* str; + char* str; int redactParams = 0; - while( (str = osrfStringArrayGetString(log_protect_arr, i++)) ) { + while( (str = (char *) osrfStringArrayGetString(log_protect_arr, i++)) ) { //osrfLogInternal(OSRF_LOG_MARK, "Checking for log protection [%s]", str); if(!strncmp(method, str, strlen(str))) { redactParams = 1; -- 2.11.0