[or-cvs] r11157: Compile without warnings on MinGW, even with --enable-gcc-wa (in tor/trunk: . src/common src/or)

nickm at seul.org nickm at seul.org
Fri Aug 17 21:46:34 UTC 2007


Author: nickm
Date: 2007-08-17 17:46:34 -0400 (Fri, 17 Aug 2007)
New Revision: 11157

Modified:
   tor/trunk/
   tor/trunk/src/common/compat.c
   tor/trunk/src/common/compat.h
   tor/trunk/src/or/connection.c
   tor/trunk/src/or/eventdns.c
   tor/trunk/src/or/eventdns_tor.h
Log:
 r14639 at catbus:  nickm | 2007-08-17 17:45:28 -0400
 Compile without warnings on MinGW, even with --enable-gcc-warnings enabled.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r14639] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2007-08-17 20:52:34 UTC (rev 11156)
+++ tor/trunk/src/common/compat.c	2007-08-17 21:46:34 UTC (rev 11157)
@@ -1671,7 +1671,7 @@
 }
 /** Release all resources held by <b>cond</b>. */
 void
-tor_conf_free(tor_cond_t *cond)
+tor_cond_free(tor_cond_t *cond)
 {
   tor_assert(cond);
   if (pthread_cond_destroy(&cond->cond)) {

Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h	2007-08-17 20:52:34 UTC (rev 11156)
+++ tor/trunk/src/common/compat.h	2007-08-17 21:46:34 UTC (rev 11157)
@@ -301,8 +301,8 @@
 #ifndef _MSC_VER
 /* Apparently, MSVC doesn't define s6_addr16 or s6_addr32. How dumb. */
 /* XXXX020 detect with autoconf. */
-#define S6_ADDR16(x) ((x).s6_addr16)
-#define S6_ADDR32(x) ((x).s6_addr32)
+#define S6_ADDR16(x) ((uint16_t*)(x).s6_addr16)
+#define S6_ADDR32(x) ((uint32_t*)(x).s6_addr32)
 #else
 #define S6_ADDR16(x) ((uint16_t*)((char*)&(x).s6_addr))
 #define S6_ADDR32(x) ((uint32_t*)((char*)&(x).s6_addr))
@@ -481,7 +481,7 @@
 #ifdef TOR_IS_MULTITHREADED
 typedef struct tor_cond_t tor_cond_t;
 tor_cond_t *tor_cond_new(void);
-void tor_conf_free(tor_cond_t *cond);
+void tor_cond_free(tor_cond_t *cond);
 int tor_cond_wait(tor_cond_t *cond, tor_mutex_t *mutex);
 void tor_cond_signal_one(tor_cond_t *cond);
 void tor_cond_signal_all(tor_cond_t *cond);

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2007-08-17 20:52:34 UTC (rev 11156)
+++ tor/trunk/src/or/connection.c	2007-08-17 21:46:34 UTC (rev 11157)
@@ -705,6 +705,8 @@
 static struct sockaddr *
 create_unix_sockaddr(const char *listenaddress, char **readable_address)
 {
+  (void)listenaddress;
+  (void)readable_address;
   log_fn(LOG_ERR, LD_BUG,
          "Unix domain sockets not supported, yet we tried to create one.");
   assert(0);

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2007-08-17 20:52:34 UTC (rev 11156)
+++ tor/trunk/src/or/eventdns.c	2007-08-17 21:46:34 UTC (rev 11157)
@@ -122,9 +122,7 @@
 #include <stdio.h>
 #endif
 
-/* XXXX020 These are for debugging possible memory leaks. */
-#include "util.h"
-#include "compat.h"
+/*XXXX020 for debugging possible memory leaks. */
 #define malloc(x) tor_malloc(x)
 #define realloc(x,y) tor_realloc((x),(y))
 #define free(x) tor_free(x)

Modified: tor/trunk/src/or/eventdns_tor.h
===================================================================
--- tor/trunk/src/or/eventdns_tor.h	2007-08-17 20:52:34 UTC (rev 11156)
+++ tor/trunk/src/or/eventdns_tor.h	2007-08-17 21:46:34 UTC (rev 11157)
@@ -17,3 +17,7 @@
 #define WIN32
 #endif
 
+/* XXXX020 These are for debugging possible memory leaks. */
+#include "util.h"
+#include "compat.h"
+



More information about the tor-commits mailing list