[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8318: Fix warnings reported by weasel when compiling Tor on Debian (in tor/trunk: . src/or)



Author: nickm
Date: 2006-09-02 22:13:52 -0400 (Sat, 02 Sep 2006)
New Revision: 8318

Modified:
   tor/trunk/
   tor/trunk/src/or/eventdns.c
Log:
 r8708@Kushana:  nickm | 2006-09-02 20:34:15 -0400
 Fix warnings reported by weasel when compiling Tor on Debian woody.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r8708] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2006-09-02 23:26:42 UTC (rev 8317)
+++ tor/trunk/src/or/eventdns.c	2006-09-03 02:13:52 UTC (rev 8318)
@@ -291,11 +291,13 @@
 #undef MIN
 #define MIN(a,b) ((a)<(b)?(a):(b))
 
+#if 0
 #ifdef __USE_ISOC99B
 // libevent doesn't work without this
 typedef uint8_t u_char;
 typedef unsigned int uint;
 #endif
+#endif
 #include <event.h>
 
 #define u64 uint64_t
@@ -317,7 +319,7 @@
 
 struct request {
 	u8 *request;  // the dns packet data
-	uint request_len;
+	unsigned int request_len;
 	u8 reissue_count;
 	u8 tx_count;  // the number of times that this packet has been sent
 	u8 request_type; // TYPE_PTR or TYPE_A
@@ -858,7 +860,7 @@
 	u32 ttl, ttl_r = 0xffffffff;
 	struct reply reply;
 	struct request *req;
-	uint i;
+	unsigned int i;
 
 	GET16(trans_id);
 	GET16(flags);
@@ -1116,7 +1118,7 @@
 		const char *const start = name;
 		name = strchr(name, '.');
 		if (!name) {
-			const uint label_len = end - start;
+			const unsigned int label_len = end - start;
 			if (label_len > 63) return -1;
 			buf[j++] = label_len;
 
@@ -1125,7 +1127,7 @@
 			break;
 		} else {
 			// append length of the label.
-			const uint label_len = name - start;
+			const unsigned int label_len = name - start;
 			if (label_len > 63) return -1;
 			buf[j++] = label_len;