From 84b6581287298e2ff70dac7e95bdb8f64292a752 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 2 Oct 2012 14:41:50 -0300 Subject: cast to avoid warning in some compilers (size_t x unsigned int) --- lstring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lstring.c b/lstring.c index 1fbce6e7..86e3e0e5 100644 --- a/lstring.c +++ b/lstring.c @@ -1,5 +1,5 @@ /* -** $Id: lstring.c,v 2.23 2012/03/28 18:28:25 roberto Exp roberto $ +** $Id: lstring.c,v 2.24 2012/05/11 14:14:42 roberto Exp roberto $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -49,7 +49,7 @@ int luaS_eqstr (TString *a, TString *b) { unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) { - unsigned int h = seed ^ l; + unsigned int h = seed ^ cast(unsigned int, l); size_t l1; size_t step = (l >> LUAI_HASHLIMIT) + 1; for (l1 = l; l1 >= step; l1 -= step) -- cgit v1.2.3-55-g6feb