Fix all warnings on win32 build

svn:r2127
This commit is contained in:
Nick Mathewson 2004-08-03 23:57:05 +00:00
parent 8cb4124121
commit 5b61dd0457
6 changed files with 10 additions and 7 deletions

View File

@ -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

View File

@ -668,7 +668,7 @@ void connection_ap_handshake_socks_resolved(connection_t *conn,
* Otherwise, send back a reply based on whether <b>success</b> 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 */

View File

@ -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);

View File

@ -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,

View File

@ -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;
}

View File

@ -36,7 +36,7 @@
#undef HAVE_INET_ATON
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H
/* #define HAVE_INTTYPES_H */
/* Define to 1 if you have the <limits.h> 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 <sys/fcntl.h> header file. */
#undef HAVE_SYS_FCNTL_H