LP#1243841 - Quiet remaining Make install warnings.
authorJason Stephenson <jason@sigio.com>
Tue, 7 Nov 2017 21:39:39 +0000 (16:39 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 7 May 2018 20:09:59 +0000 (16:09 -0400)
We silence the following warnings:

apachetools.c:179:15: warning: initialization discards 'const' qualifier
from pointer target type [enabled by default]

apachetools.c:181:8: warning: assignment discards 'const' qualifier from
pointer target type [enabled by default]

apachetools.c:183:8: warning: assignment discards 'const' qualifier from
pointer target type [enabled by default]

./osrf_websocket_translator.c:541:9: warning: return makes integer from
pointer without a cast [enabled by default]

./osrf_http_translator.c:300:25: warning: passing argument 1 of 'free'
discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
src/gateway/apachetools.c
src/gateway/osrf_http_translator.c
src/gateway/osrf_websocket_translator.c

index d3975d3..b6db557 100644 (file)
@@ -176,7 +176,7 @@ int crossOriginHeaders(request_rec* r, osrfStringArray* allowedOrigins) {
                return 0;
 
        /* remove scheme from address */
-       char *host = origin;
+       const char *host = origin;
        if ( !strncmp(origin, "http://", 7) )
                host = origin + 7;
        if ( !strncmp(origin, "https://", 8) )
index fd2bf23..789aaae 100644 (file)
@@ -297,7 +297,7 @@ static char* osrfHttpTranslatorParseRequest(osrfHttpTranslator* trans) {
                         else
                             OSRF_BUFFER_ADD(act, ", ");
                         OSRF_BUFFER_ADD(act, str);
-                        free(str);
+                        free((void *)str);
                     }
                 }
                 osrfLogActivity(OSRF_LOG_MARK, "%s", act->buf);
index 8da5a36..75d6876 100644 (file)
@@ -554,7 +554,7 @@ static int build_startup_data(const WebSocketServer *server) {
     // the only data entering this pools are the session strings.
     if (apr_pool_create(&stateful_session_pool, trans->main_pool) != APR_SUCCESS) {
         osrfLogError(OSRF_LOG_MARK, "WS Unable to create apr_pool");
-        return NULL;
+        return 0;
     }
     trans->stateful_session_pool = stateful_session_pool;