Browse Source

Fix all warnings on win32 build

svn:r2127
Nick Mathewson 21 years ago
parent
commit
5b61dd0457
6 changed files with 10 additions and 7 deletions
  1. 1 1
      src/common/util.c
  2. 1 1
      src/or/connection_edge.c
  3. 2 1
      src/or/dirserv.c
  4. 1 1
      src/or/or.h
  5. 2 2
      src/or/rephist.c
  6. 3 1
      src/win32/orconfig.h

+ 1 - 1
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
 

+ 1 - 1
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 <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 */

+ 2 - 1
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);

+ 1 - 1
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,

+ 2 - 2
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;
 }

+ 3 - 1
src/win32/orconfig.h

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