Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [opensuse patch] |
| 2 | |
| 3 | Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com> |
| 4 | |
| 5 | Index: guile-2.0.3/libguile/hash.c |
| 6 | =================================================================== |
| 7 | --- guile-2.0.3.orig/libguile/hash.c 2011-07-06 15:49:59.000000000 -0700 |
| 8 | +++ guile-2.0.3/libguile/hash.c 2012-01-13 21:49:43.332844884 -0800 |
| 9 | @@ -270,7 +270,7 @@ scm_hasher(SCM obj, unsigned long n, siz |
| 10 | unsigned long |
| 11 | scm_ihashq (SCM obj, unsigned long n) |
| 12 | { |
| 13 | - return (SCM_UNPACK (obj) >> 1) % n; |
| 14 | + return ((unsigned long) SCM_UNPACK (obj) >> 1) % n; |
| 15 | } |
| 16 | |
| 17 | |
| 18 | @@ -306,7 +306,7 @@ scm_ihashv (SCM obj, unsigned long n) |
| 19 | if (SCM_NUMP(obj)) |
| 20 | return (unsigned long) scm_hasher(obj, n, 10); |
| 21 | else |
| 22 | - return SCM_UNPACK (obj) % n; |
| 23 | + return (unsigned long) SCM_UNPACK (obj) % n; |
| 24 | } |
| 25 | |
| 26 | |
| 27 | Index: guile-2.0.3/libguile/struct.c |
| 28 | =================================================================== |
| 29 | --- guile-2.0.3.orig/libguile/struct.c 2011-07-06 15:50:00.000000000 -0700 |
| 30 | +++ guile-2.0.3/libguile/struct.c 2012-01-13 21:49:43.332844884 -0800 |
| 31 | @@ -942,7 +942,7 @@ scm_struct_ihashq (SCM obj, unsigned lon |
| 32 | { |
| 33 | /* The length of the hash table should be a relative prime it's not |
| 34 | necessary to shift down the address. */ |
| 35 | - return SCM_UNPACK (obj) % n; |
| 36 | + return (unsigned long) SCM_UNPACK (obj) % n; |
| 37 | } |
| 38 | |
| 39 | SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0, |