svn rev #24152: trunk/src/lib/apputils/

ghudson@MIT.EDU ghudson at MIT.EDU
Wed Jun 30 12:11:34 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24152
Commit By: ghudson
Log Message:
Eliminate warnings in net-server.c.



Changed Files:
U   trunk/src/lib/apputils/net-server.c
Modified: trunk/src/lib/apputils/net-server.c
===================================================================
--- trunk/src/lib/apputils/net-server.c	2010-06-30 16:03:22 UTC (rev 24151)
+++ trunk/src/lib/apputils/net-server.c	2010-06-30 16:11:33 UTC (rev 24152)
@@ -236,7 +236,7 @@
     (((int)(set.max + incr) < set.max                                   \
       || (((size_t)((int)(set.max + incr) * sizeof(set.data[0]))        \
            / sizeof(set.data[0]))                                       \
-          != (set.max + incr)))                                         \
+          != (size_t)(set.max + incr)))                                 \
      ? 0                          /* overflow */                        \
      : ((tmpptr = realloc(set.data,                                     \
                           (int)(set.max + incr) * sizeof(set.data[0]))) \
@@ -322,7 +322,7 @@
 }
 
 krb5_error_code
-add_rpc_service(int port, u_long prognum, u_long versnum, void (*dispatch)())
+add_rpc_service(int port, u_long prognum, u_long versnum, void (*dispatchfn)())
 {
     int i;
     void *tmp;
@@ -333,7 +333,7 @@
         return EINVAL;
     svc.prognum = prognum;
     svc.versnum = versnum;
-    svc.dispatch = dispatch;
+    svc.dispatch = dispatchfn;
 
     FOREACH_ELT (rpc_svc_data, i, val) {
         if (val.port == port)
@@ -1504,7 +1504,7 @@
                 saddrbuf, sportbuf, daddrbuf);
         return;
     }
-    if (cc != response->length) {
+    if ((size_t)cc != response->length) {
         com_err(prog, 0, "short reply write %d vs %d\n",
                 response->length, cc);
     }
@@ -1591,7 +1591,7 @@
         p = newconn->u.tcp.addrbuf;
         end = p + sizeof(newconn->u.tcp.addrbuf);
         p += strlen(p);
-        if (end - p > 2 + strlen(tmpbuf)) {
+        if ((size_t)(end - p) > 2 + strlen(tmpbuf)) {
             *p++ = '.';
             strlcpy(p, tmpbuf, end - p);
         }
@@ -1711,8 +1711,8 @@
         }
         while (nwrote) {
             sg_buf *sgp = conn->u.tcp.sgp;
-            if (nwrote < SG_LEN(sgp)) {
-                SG_ADVANCE(sgp, nwrote);
+            if ((size_t)nwrote < SG_LEN(sgp)) {
+                SG_ADVANCE(sgp, (size_t)nwrote);
                 nwrote = 0;
             } else {
                 nwrote -= SG_LEN(sgp);
@@ -2016,7 +2016,7 @@
                 p = newconn->u.tcp.addrbuf;
                 end = p + sizeof(newconn->u.tcp.addrbuf);
                 p += strlen(p);
-                if (end - p > 2 + strlen(tmpbuf)) {
+                if ((size_t)(end - p) > 2 + strlen(tmpbuf)) {
                     *p++ = '.';
                     strlcpy(p, tmpbuf, end - p);
                 }




More information about the cvs-krb5 mailing list