mirror of
https://github.com/lua/lua.git
synced 2025-07-04 15:09:38 +00:00
corrected warnings from different compilers (mostly casts and small
details)
This commit is contained in:
parent
1475cb59bf
commit
4590a89b32
9 changed files with 21 additions and 22 deletions
4
liolib.c
4
liolib.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: liolib.c,v 2.90 2010/07/25 15:18:19 roberto Exp roberto $
|
||||
** $Id: liolib.c,v 2.91 2010/07/28 15:51:59 roberto Exp roberto $
|
||||
** Standard I/O (and system) library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -453,7 +453,7 @@ static int f_read (lua_State *L) {
|
|||
static int io_readline (lua_State *L) {
|
||||
FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1));
|
||||
int i;
|
||||
int n = lua_tointeger(L, lua_upvalueindex(2));
|
||||
int n = (int)lua_tointeger(L, lua_upvalueindex(2));
|
||||
if (f == NULL) /* file is already closed? */
|
||||
luaL_error(L, "file is already closed");
|
||||
lua_settop(L , 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue