]> err.no Git - sope/commitdiff
fixed (all?) gcc 4.0 warnings
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 1 Aug 2005 09:32:18 +0000 (09:32 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 1 Aug 2005 09:32:18 +0000 (09:32 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@952 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/mod_ngobjweb/ChangeLog
sope-appserver/mod_ngobjweb/handler.c
sope-appserver/mod_ngobjweb/scanhttp.c
sope-appserver/mod_ngobjweb/sns.c

index 79e83442b39786b034348b3caec8c2998b864393..6ecca576283db25f1aba66097f9a40b06c20078a 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-01  Helge Hess  <helge.hess@skyrix.com>
+
+       * scanhttp.c, sns.c: fixed gcc 4.0 warnings
+
 2005-07-31  Helge Hess  <helge.hess@opengroupware.org>
 
        * NGBufferedDescriptor.[hc]: fixed some gcc 4.0 warnings
index a1e7928afaedcb72855ee294794fd59b2119fd6a..ce100333a8ee724936338dc824b03e2455e033fb 100644 (file)
@@ -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;
           }
index b3dcaa53bd440e533da182ee3588443e62d0b97d..2b66c9fd739ac6227facc466724fca743c85f7c9 100644 (file)
@@ -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;
index f22ab4773b1d49add6c24a8e1fb012b842a3e8d3..9db8c32e3bab756d8677c8c36cd09c57fb2113dc 100644 (file)
@@ -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));