From 90ae6f49b8106edbe606978c924c24dc69b6a140 Mon Sep 17 00:00:00 2001
From: Alex Shinn <ashinn@users.noreply.github.com>
Date: Mon, 4 Jul 2011 22:04:09 +0900
Subject: [PATCH] adding cast for safety

---
 lib/srfi/18/threads.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/srfi/18/threads.c b/lib/srfi/18/threads.c
index 365a9011..5572dca7 100644
--- a/lib/srfi/18/threads.c
+++ b/lib/srfi/18/threads.c
@@ -278,7 +278,7 @@ static const sexp_uint_t sexp_log2_lookup[32] = {
 
 /* only works on powers of two */
 static sexp_uint_t sexp_log2_of_pow2 (sexp_uint_t n) {
-  return sexp_log2_lookup[(n * 0x077CB531U) >> 27];
+  return sexp_log2_lookup[((unsigned)n * 0x077CB531U) >> 27];
 }
 
 static sexp sexp_pop_signal (sexp ctx sexp_api_params(self, n)) {