[tor-commits] [torsocks/master] Fix compile warning on some versions of gcc

hoganrobert at torproject.org hoganrobert at torproject.org
Fri Feb 25 22:38:59 UTC 2011


commit a27c874cf2b47460ff727e79d5b315be0a75b4e8
Author: Robert Hogan <robert at roberthogan.net>
Date:   Tue Feb 22 21:48:45 2011 +0000

    Fix compile warning on some versions of gcc
    
    Seen on i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)
---
 test/test_torsocks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test_torsocks.c b/test/test_torsocks.c
index 60d78c8..d9ea32a 100644
--- a/test/test_torsocks.c
+++ b/test/test_torsocks.c
@@ -105,7 +105,7 @@ static int icmp_test()
     iphdr->ip_v=4;
     iphdr->ip_hl=5;
     iphdr->ip_len=sizeof(datagram);
-    iphdr->ip_id=htonl(54321);
+    iphdr->ip_id=(unsigned char)htonl(54321);
     iphdr->ip_off=0;
     iphdr->ip_ttl=225;
     iphdr->ip_p=1;





More information about the tor-commits mailing list