[or-cvs] Clean up a few warnings that make gcc twig out a bit.

Nick Mathewson nickm at seul.org
Wed Sep 14 20:59:27 UTC 2005


Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv30923/common

Modified Files:
	compat.c 
Log Message:
Clean up a few warnings that make gcc twig out a bit.

Index: compat.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- compat.c	26 Aug 2005 18:40:44 -0000	1.66
+++ compat.c	14 Sep 2005 20:59:25 -0000	1.67
@@ -1001,7 +1001,12 @@
 unsigned long
 tor_get_thread_id(void)
 {
-  return (unsigned long)pthread_self();
+  union {
+    pthread_t thr;
+    unsigned long id;
+  } r;
+  r.thr = pthread_self();
+  return r.id;
 }
 #else
 struct tor_mutex_t {



More information about the tor-commits mailing list