@matheusbsbs / matheus-bagliano / commits / 8fcf1ad9c6
Fork 0

fix warning from pack-objects.c

When compiling on ia64 I get this warning (from gcc 3.4.3): gcc -o pack-objects.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' pack-objects.c pack-objects.c: In function `pack_revindex_ix': pack-objects.c:94: warning: cast from pointer to integer of different size A double cast (first to long, then to int) shuts gcc up, but is there a better way? [jc: Andreas Ericsson suggests to use ulong instead. ] Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Luck, Tony committed Feb 23, 2006 at 14:42 UTC 8fcf1ad9c68e15d881194c8544e7c11d33529c2b
1 file changed +1 -1
pack-objects.c
+1 -1
@@ -99,7 +99,7 @@ static int reused_delta = 0;
99
100 static int pack_revindex_ix(struct packed_git *p)
101 {
102 - unsigned int ui = (unsigned int) p;
102 + unsigned long ui = (unsigned long)(long)p;
103 int i;
104
105 ui = ui ^ (ui >> 16); /* defeat structure alignment */