]> mj.ucw.cz Git - libucw.git/commitdiff
Avoid "cast of pointer to a smaller integer type" warnings.
authorMartin Mares <mj@ucw.cz>
Thu, 3 Mar 2005 19:40:51 +0000 (19:40 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 3 Mar 2005 19:40:51 +0000 (19:40 +0000)
lib/hashfunc.h

index 2b2713ea8b19cc13b54b1bc4a165c9484def6d42..17a865b19184c0ca301db4f173d6d37bead3a39c 100644 (file)
@@ -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