From 5b61dd04570c93ec6663f5893951c312b95f58f9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 3 Aug 2004 23:57:05 +0000 Subject: [PATCH] Fix all warnings on win32 build svn:r2127 --- src/common/util.c | 2 +- src/or/connection_edge.c | 2 +- src/or/dirserv.c | 3 ++- src/or/or.h | 2 +- src/or/rephist.c | 4 ++-- src/win32/orconfig.h | 4 +++- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/common/util.c b/src/common/util.c index 42679a33b4..ed5b6a06f4 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1641,7 +1641,7 @@ void finish_daemon(void) } #else /* defined(MS_WINDOWS) */ -void start_daemon(char *cp) {} +void start_daemon(const char *cp) {} void finish_daemon(void) {} #endif diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 52e578da8e..f5030f189f 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -668,7 +668,7 @@ void connection_ap_handshake_socks_resolved(connection_t *conn, * Otherwise, send back a reply based on whether success is 1 or 0. */ void connection_ap_handshake_socks_reply(connection_t *conn, char *reply, - int replylen, char success) { + int replylen, int success) { char buf[256]; if(replylen) { /* we already have a reply in mind */ diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 5316fe900a..f76a01a8eb 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -696,8 +696,9 @@ static int generate_runningrouters(crypto_pk_env_t *private_key) char *s, *cp; char digest[DIGEST_LEN]; char signature[PK_BYTES]; - int i, len; + int i; char published[33]; + size_t len; time_t published_on; len = 1024+(MAX_HEX_NICKNAME_LEN+2)*smartlist_len(descriptor_list); diff --git a/src/or/or.h b/src/or/or.h index 8bdfb1f80e..34290e4542 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1094,7 +1094,7 @@ int connection_ap_handshake_send_resolve(connection_t *ap_conn, circuit_t *circ) int connection_ap_make_bridge(char *address, uint16_t port); void connection_ap_handshake_socks_reply(connection_t *conn, char *reply, - int replylen, char success); + int replylen, int success); void connection_ap_handshake_socks_resolved(connection_t *conn, int answer_type, int answer_len, diff --git a/src/or/rephist.c b/src/or/rephist.c index 0cca2097dc..1f3848b786 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -468,9 +468,9 @@ int rep_hist_bandwidth_assess(time_t when) { r = find_largest_max(read_array); w = find_largest_max(write_array); if (r>w) - return w/(double)NUM_SECS_ROLLING_MEASURE; + return (int)(w/(double)NUM_SECS_ROLLING_MEASURE); else - return r/(double)NUM_SECS_ROLLING_MEASURE; + return (int)(r/(double)NUM_SECS_ROLLING_MEASURE); return 0; } diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h index 0594cfab33..ddbf23a0fb 100644 --- a/src/win32/orconfig.h +++ b/src/win32/orconfig.h @@ -36,7 +36,7 @@ #undef HAVE_INET_ATON /* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H +/* #define HAVE_INTTYPES_H */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H @@ -86,6 +86,8 @@ /* Define to 1 if you have the `strptime' function. */ #undef HAVE_STRPTIME +#define HAVE_STRUCT_TIMEVAL_TV_SEC + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FCNTL_H