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

[or-cvs] Make compile warning-free on cygwin



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

Modified Files:
	circuit.c connection_edge.c dns.c router.c routerlist.c 
Log Message:
Make compile warning-free on cygwin

Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- circuit.c	14 Dec 2003 08:32:13 -0000	1.116
+++ circuit.c	15 Dec 2003 21:35:52 -0000	1.117
@@ -663,7 +663,9 @@
       log(severity,"Building: desired len %d, planned exit node %s.",
           circ->build_state->desired_path_len, circ->build_state->chosen_exit);
     for(hop=circ->cpath;hop->next != circ->cpath; hop=hop->next)
-      log(severity,"hop: state %d, addr %d, port %d", hop->state, hop->addr, hop->port);
+      log(severity,"hop: state %d, addr %x, port %d", hop->state, 
+          (unsigned int)hop->addr, 
+          (int)hop->port);
   }
 }
 
@@ -989,7 +991,8 @@
   crypto_dh_free(hop->handshake_state); /* don't need it anymore */
   hop->handshake_state = NULL;
 
-  log_fn(LOG_DEBUG,"hop %d init cipher forward %d, backward %d.", (uint32_t)hop, *(uint32_t*)keys, *(uint32_t*)(keys+16));
+  log_fn(LOG_DEBUG,"hop %d init cipher forward %u, backward %u.", 
+        (int)hop, (unsigned)*(uint32_t*)keys, (unsigned) *(uint32_t*)(keys+16));
   if (!(hop->f_crypto =
         crypto_create_init_cipher(CIRCUIT_CIPHER,keys,iv,1))) {
     log(LOG_WARN,"forward cipher initialization failed.");

Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- connection_edge.c	14 Dec 2003 08:32:14 -0000	1.75
+++ connection_edge.c	15 Dec 2003 21:35:52 -0000	1.76
@@ -893,7 +893,7 @@
   assert(address);
 
   if (inet_aton(address, &in)) {
-    log_fn(LOG_DEBUG, "Using static address %s (%08X)", address, 
+    log_fn(LOG_DEBUG, "Using static address %s (%08lX)", address, 
            ntohl(in.s_addr));
     return ntohl(in.s_addr);
   }

Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- dns.c	14 Dec 2003 08:32:14 -0000	1.44
+++ dns.c	15 Dec 2003 21:35:52 -0000	1.45
@@ -75,7 +75,7 @@
    */
   while(oldest_cached_resolve && (oldest_cached_resolve->expire < now)) {
     resolve = oldest_cached_resolve;
-    log(LOG_DEBUG,"Forgetting old cached resolve (expires %d)", resolve->expire);
+    log(LOG_DEBUG,"Forgetting old cached resolve (expires %lu)", (unsigned long)resolve->expire);
     oldest_cached_resolve = resolve->next;
     if(!oldest_cached_resolve) /* if there are no more, */
       newest_cached_resolve = NULL; /* then make sure the list's tail knows that too */

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/src/or/router.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- router.c	13 Dec 2003 02:44:02 -0000	1.3
+++ router.c	15 Dec 2003 21:35:52 -0000	1.4
@@ -421,7 +421,7 @@
     router->or_port,
     router->socks_port,
     router->dir_port,
-    router->bandwidth,
+    (int) router->bandwidth,
     platform,
     published,
     onion_pkey, link_pkey, identity_pkey);

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- routerlist.c	14 Dec 2003 00:04:29 -0000	1.10
+++ routerlist.c	15 Dec 2003 21:35:52 -0000	1.11
@@ -755,8 +755,9 @@
     goto err;
   }
   
-  log_fn(LOG_DEBUG,"or_port %d, socks_port %d, dir_port %d, bandwidth %d.",
-    router->or_port, router->socks_port, router->dir_port, router->bandwidth);
+  log_fn(LOG_DEBUG,"or_port %d, socks_port %d, dir_port %d, bandwidth %u.",
+    router->or_port, router->socks_port, router->dir_port, 
+    (unsigned) router->bandwidth);
 
   /* XXX Later, require platform before published. */
   NEXT_TOKEN();