From: helge Date: Mon, 1 Aug 2005 09:32:18 +0000 (+0000) Subject: fixed (all?) gcc 4.0 warnings X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f7ae0b26f3f4d7c9612f4085615e955f4d9ac19;p=sope fixed (all?) gcc 4.0 warnings git-svn-id: http://svn.opengroupware.org/SOPE/trunk@952 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/mod_ngobjweb/ChangeLog b/sope-appserver/mod_ngobjweb/ChangeLog index 79e83442..6ecca576 100644 --- a/sope-appserver/mod_ngobjweb/ChangeLog +++ b/sope-appserver/mod_ngobjweb/ChangeLog @@ -1,3 +1,7 @@ +2005-08-01 Helge Hess + + * scanhttp.c, sns.c: fixed gcc 4.0 warnings + 2005-07-31 Helge Hess * NGBufferedDescriptor.[hc]: fixed some gcc 4.0 warnings diff --git a/sope-appserver/mod_ngobjweb/handler.c b/sope-appserver/mod_ngobjweb/handler.c index a1e7928a..ce100333 100644 --- a/sope-appserver/mod_ngobjweb/handler.c +++ b/sope-appserver/mod_ngobjweb/handler.c @@ -240,7 +240,7 @@ static int _writeInHeaders(NGBufferedDescriptor *toApp, request_rec *r) { apr_table_entry_t *entry = &(entries[i]); if (!NGBufferedDescriptor_writeHttpHeader(toApp, - entry->key, entry->val)) { + entry->key, (void*)entry->val)) { return 0; } } @@ -445,7 +445,7 @@ int ngobjweb_handler(request_rec *r) { value = (value != NULL) ? value : "http"; if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-server-protocol", - value)) { + (unsigned char *)value)) { writeError = 1; goto writeErrorHandler; } @@ -453,7 +453,7 @@ int ngobjweb_handler(request_rec *r) { if ((value = r->connection->remote_ip) != NULL) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-remote-addr", - value)) { + (unsigned char *)value)) { writeError = 1; goto writeErrorHandler; } @@ -464,7 +464,7 @@ int ngobjweb_handler(request_rec *r) { if (value != NULL) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-remote-host", - value)) { + (unsigned char *)value)) { writeError = 1; goto writeErrorHandler; } @@ -477,7 +477,7 @@ int ngobjweb_handler(request_rec *r) { #endif if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-auth-type", - value)) { + (unsigned char *)value)) { writeError = 1; goto writeErrorHandler; } @@ -490,7 +490,7 @@ int ngobjweb_handler(request_rec *r) { #endif if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-remote-user", - value)) { + (unsigned char *)value)) { writeError = 1; goto writeErrorHandler; } @@ -499,7 +499,8 @@ int ngobjweb_handler(request_rec *r) { if (cfg != NULL) { if (cfg->appPrefix != NULL) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, - "x-webobjects-adaptor-prefix", cfg->appPrefix)) { + "x-webobjects-adaptor-prefix", + (unsigned char *)cfg->appPrefix)) { writeError = 1; goto writeErrorHandler; } @@ -508,6 +509,7 @@ int ngobjweb_handler(request_rec *r) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-server-name", + (unsigned char *) r->server->server_hostname)) { writeError = 1; goto writeErrorHandler; @@ -517,7 +519,7 @@ int ngobjweb_handler(request_rec *r) { apr_snprintf(tmp, sizeof(tmp), "%i", r->server->port); if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-server-port", - tmp)) { + (unsigned char *)tmp)) { writeError = 1; goto writeErrorHandler; } @@ -537,7 +539,7 @@ int ngobjweb_handler(request_rec *r) { } if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-server-url", - tmp)) { + (unsigned char *)tmp)) { writeError = 1; goto writeErrorHandler; } @@ -552,7 +554,7 @@ int ngobjweb_handler(request_rec *r) { if (s != NULL && strncasecmp(s, "on", 2) == 0) { // SSL is one if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-https-enabled", - "1")) { + (unsigned char *)"1")) { writeError = 1; goto writeErrorHandler; } @@ -566,7 +568,7 @@ int ngobjweb_handler(request_rec *r) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-clients-cert", - s)) { + (unsigned char *)s)) { writeError = 1; goto writeErrorHandler; } @@ -584,7 +586,7 @@ int ngobjweb_handler(request_rec *r) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, entry->key, - entry->val)) { + (void *)entry->val)) { writeError = 1; goto writeErrorHandler; } @@ -595,7 +597,7 @@ int ngobjweb_handler(request_rec *r) { if ((s = apr_table_get(env, "SSL_CIPHER_ALGKEYSIZE")) != NULL) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-https-secret-keysize", - s)) { + (unsigned char *)s)) { writeError = 1; goto writeErrorHandler; } @@ -603,7 +605,7 @@ int ngobjweb_handler(request_rec *r) { if ((s = apr_table_get(env, "SSL_CIPHER_USEKEYSIZE")) != NULL) { if (!NGBufferedDescriptor_writeHttpHeader(toApp, "x-webobjects-https-keysize", - s)) { + (unsigned char *)s)) { writeError = 1; goto writeErrorHandler; } diff --git a/sope-appserver/mod_ngobjweb/scanhttp.c b/sope-appserver/mod_ngobjweb/scanhttp.c index b3dcaa53..2b66c9fd 100644 --- a/sope-appserver/mod_ngobjweb/scanhttp.c +++ b/sope-appserver/mod_ngobjweb/scanhttp.c @@ -171,7 +171,7 @@ apr_table_t *NGScanHeaders(apr_pool_t *_pool, NGBufferedDescriptor *_in) { break; // store value - apr_table_set(headers, name, value); + apr_table_set(headers, (char *)name, (char *)value); } } return headers; diff --git a/sope-appserver/mod_ngobjweb/sns.c b/sope-appserver/mod_ngobjweb/sns.c index f22ab477..9db8c32e 100644 --- a/sope-appserver/mod_ngobjweb/sns.c +++ b/sope-appserver/mod_ngobjweb/sns.c @@ -91,11 +91,11 @@ static void _getSNSAddressForRequest(request_rec *_rq, struct sockaddr **_sns, port = strtol((pos + 1), &end, 10); host = apr_palloc(_rq->pool, (pos - socket) + 3); - strncpy(host, socket, (pos - socket)); + strncpy((char *)host, socket, (pos - socket)); host[pos - socket] = '\0'; } else { - host = "127.0.0.1"; + host = (unsigned char *)"127.0.0.1"; port = strtol(socket, &end, 10); } @@ -103,7 +103,7 @@ static void _getSNSAddressForRequest(request_rec *_rq, struct sockaddr **_sns, memset(result, 0, sizeof(struct sockaddr_in)); snsi = (struct sockaddr_in *)result; - snsi->sin_addr.s_addr = apr_inet_addr(host); + snsi->sin_addr.s_addr = apr_inet_addr((char *)host); snsi->sin_family = AF_INET; snsi->sin_port = htons((short)(port & 0xFFFF));