[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Resolve format warnings on MacOS X 10.3



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv17002/src/or

Modified Files:
	buffers.c connection_edge.c directory.c 
Log Message:
Resolve format warnings on MacOS X 10.3

Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/buffers.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- buffers.c	14 Dec 2003 08:15:41 -0000	1.55
+++ buffers.c	16 Dec 2003 05:33:11 -0000	1.56
@@ -291,7 +291,7 @@
   assert(string && BUF_OK(buf));
 
   if (buf_ensure_capacity(buf, buf->datalen+string_len)) {
-    log_fn(LOG_WARN, "buflen too small, can't hold %d bytes.",buf->datalen+string_len);
+    log_fn(LOG_WARN, "buflen too small, can't hold %d bytes.", (int)buf->datalen+string_len);
     return -1;
   }
 
@@ -453,7 +453,7 @@
           tmpbuf = inet_ntoa(in);
           if(strlen(tmpbuf)+1 > MAX_SOCKS_ADDR_LEN) {
             log_fn(LOG_WARN,"socks5 IP takes %d bytes, which doesn't fit in %d",
-                   strlen(tmpbuf)+1,MAX_SOCKS_ADDR_LEN);
+                   (int)strlen(tmpbuf)+1,(int)MAX_SOCKS_ADDR_LEN);
             return -1;
           }
           strcpy(req->address,tmpbuf);
@@ -502,7 +502,8 @@
         in.s_addr = htonl(destip);
         tmpbuf = inet_ntoa(in);
         if(strlen(tmpbuf)+1 > MAX_SOCKS_ADDR_LEN) {
-          log_fn(LOG_WARN,"socks4 addr (%d bytes) too long.", strlen(tmpbuf));
+          log_fn(LOG_WARN,"socks4 addr (%d bytes) too long.",
+                 (int)strlen(tmpbuf));
           return -1;
         }
         log_fn(LOG_DEBUG,"socks4: successfully read destip (%s)", tmpbuf);

Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- connection_edge.c	15 Dec 2003 21:35:52 -0000	1.76
+++ connection_edge.c	16 Dec 2003 05:33:11 -0000	1.77
@@ -893,8 +893,8 @@
   assert(address);
 
   if (inet_aton(address, &in)) {
-    log_fn(LOG_DEBUG, "Using static address %s (%08lX)", address, 
-           ntohl(in.s_addr));
+    log_fn(LOG_DEBUG, "Using static address %s (%08lX)", address,
+           (unsigned long)ntohl(in.s_addr));
     return ntohl(in.s_addr);
   }
   search.address = (char*)address;

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- directory.c	14 Dec 2003 05:25:23 -0000	1.53
+++ directory.c	16 Dec 2003 05:33:11 -0000	1.54
@@ -85,7 +85,7 @@
         return -1;
       }
       snprintf(tmp, sizeof(tmp), "POST / HTTP/1.0\r\nContent-Length: %d\r\n\r\n%s",
-               strlen(s), s);
+               (int)strlen(s), s);
       connection_write_to_buf(tmp, strlen(tmp), conn);
       conn->state = DIR_CONN_STATE_CLIENT_SENDING_UPLOAD;
       break;