diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-12-15 21:35:52 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-12-15 21:35:52 +0000 |
commit | 4885e904906dcc967e3597301c17ad95bb77b5e0 (patch) | |
tree | 2991699afdd3ab55fdcd1c50965f4c0443786070 | |
parent | a5aa80cc419d6831ce339496a1c644f2347496a2 (diff) | |
download | tor-4885e904906dcc967e3597301c17ad95bb77b5e0.tar tor-4885e904906dcc967e3597301c17ad95bb77b5e0.tar.gz |
Make compile warning-free on cygwin
svn:r936
-rw-r--r-- | src/common/util.c | 2 | ||||
-rw-r--r-- | src/or/circuit.c | 7 | ||||
-rw-r--r-- | src/or/connection_edge.c | 2 | ||||
-rw-r--r-- | src/or/dns.c | 2 | ||||
-rw-r--r-- | src/or/router.c | 2 | ||||
-rw-r--r-- | src/or/routerlist.c | 5 |
6 files changed, 12 insertions, 8 deletions
diff --git a/src/common/util.c b/src/common/util.c index 623ec05ba..1de6b99d6 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -532,7 +532,7 @@ int check_private_dir(const char *dirname, int create) return -1; } if (st.st_uid != getuid()) { - log(LOG_WARN, "%s is not owned by this UID (%d)", dirname, getuid()); + log(LOG_WARN, "%s is not owned by this UID (%d)", dirname, (int)getuid()); return -1; } if (st.st_mode & 0077) { diff --git a/src/or/circuit.c b/src/or/circuit.c index d3fa4a3eb..0d908bf20 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -663,7 +663,9 @@ void circuit_dump_details(int severity, circuit_t *circ, int poll_index, 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 @@ int circuit_finish_handshake(circuit_t *circ, char *reply) { 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."); diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index da33142a3..650023a3a 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -893,7 +893,7 @@ static uint32_t client_dns_lookup_entry(const char *address) 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); } diff --git a/src/or/dns.c b/src/or/dns.c index 8225b4e2b..269e3dcff 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -75,7 +75,7 @@ static void purge_expired_resolves(uint32_t now) { */ 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 */ diff --git a/src/or/router.c b/src/or/router.c index a8626a604..9ae4ebd14 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -421,7 +421,7 @@ int router_dump_router_to_string(char *s, int maxlen, routerinfo_t *router, router->or_port, router->socks_port, router->dir_port, - router->bandwidth, + (int) router->bandwidth, platform, published, onion_pkey, link_pkey, identity_pkey); diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 87a063e33..84716591c 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -755,8 +755,9 @@ routerinfo_t *router_get_entry_from_string(const char**s) { 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(); |