From 607be77ec8d2b6062077772a55831a5aca16fb2d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 1 Apr 2014 11:39:55 -0300 Subject: some details to avoid warnings --- ltable.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index 36f6be0f..74feb4bd 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.83 2013/09/11 12:26:14 roberto Exp roberto $ +** $Id: ltable.c,v 2.84 2014/01/27 13:34:32 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -443,10 +443,10 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) { /* yes; move colliding node into free position */ while (othern + gnext(othern) != mp) /* find previous */ othern += gnext(othern); - gnext(othern) = f - othern; /* re-chain with 'f' in place of 'mp' */ + gnext(othern) = cast_int(f - othern); /* rechain to point to 'f' */ *f = *mp; /* copy colliding node into free pos. (mp->next also goes) */ if (gnext(mp) != 0) { - gnext(f) += mp - f; /* correct 'next' */ + gnext(f) += cast_int(mp - f); /* correct 'next' */ gnext(mp) = 0; /* now 'mp' is free */ } setnilvalue(gval(mp)); @@ -454,9 +454,9 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) { else { /* colliding node is in its own main position */ /* new node will go into free position */ if (gnext(mp) != 0) - gnext(f) = (mp + gnext(mp)) - f; /* chain new position */ + gnext(f) = cast_int((mp + gnext(mp)) - f); /* chain new position */ else lua_assert(gnext(f) == 0); - gnext(mp) = f - mp; + gnext(mp) = cast_int(f - mp); mp = f; } } -- cgit v1.2.3-55-g6feb