From: Martin Mares Date: Thu, 3 Mar 2005 19:40:51 +0000 (+0000) Subject: Avoid "cast of pointer to a smaller integer type" warnings. X-Git-Tag: holmes-import~815 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9ea0ef22f6917595b21ae7594c0e54c1042e5e1a;p=libucw.git Avoid "cast of pointer to a smaller integer type" warnings. --- diff --git a/lib/hashfunc.h b/lib/hashfunc.h index 2b2713ea..17a865b1 100644 --- a/lib/hashfunc.h +++ b/lib/hashfunc.h @@ -40,6 +40,6 @@ uns hash_string_nocase(const byte *str) CONST; * instructions are slow). */ static inline uns CONST hash_int(uns x) { return 0x01008041*x; } -static inline uns CONST hash_pointer(void *x) { return hash_int((uns)x); } +static inline uns CONST hash_pointer(void *x) { return hash_int((uns)(addr_int_t)x); } #endif