lua

A copy of the Lua development repository
Log | Files | Refs | README

commit a7fa7bafc808103cbb8e27a3c80168617bac8a4f
parent cde179b36979c58d9380d3c4dd29b61412d13b51
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue,  9 Nov 1999 15:59:13 -0200

new warnings with option "-W" (gcc)

Diffstat:
Mliolib.c | 4++--
Mllex.c | 4++--
Mlua.c | 3++-
Mlzio.c | 3++-
4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/liolib.c b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 1.48 1999/10/19 13:33:22 roberto Exp roberto $ +** $Id: liolib.c,v 1.49 1999/10/26 11:00:12 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -608,7 +608,7 @@ static const struct luaL_reg iolibtag[] = { static void openwithtags (void) { - int i; + unsigned int i; int iotag = lua_newtag(); lua_newtag(); /* alloc CLOSEDTAG: assume that CLOSEDTAG = iotag-1 */ for (i=0; i<sizeof(iolibtag)/sizeof(iolibtag[0]); i++) { diff --git a/llex.c b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.41 1999/10/11 16:13:42 roberto Exp roberto $ +** $Id: llex.c,v 1.42 1999/10/19 13:33:22 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -34,7 +34,7 @@ static const char *const reserved [] = {"and", "do", "else", "elseif", "end", void luaX_init (void) { - int i; + unsigned int i; for (i=0; i<(sizeof(reserved)/sizeof(reserved[0])); i++) { TaggedString *ts = luaS_new(reserved[i]); ts->marked = (unsigned char)(RESERVEDMARK+i); /* reserved word */ diff --git a/lua.c b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.22 1999/08/16 20:52:00 roberto Exp roberto $ +** $Id: lua.c,v 1.23 1999/08/18 17:40:54 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -45,6 +45,7 @@ static void lstop (void) { static void laction (int i) { + (void)i; /* to avoid warnings */ signal(SIGINT, SIG_DFL); /* if another SIGINT happens before lstop, terminate process (default action) */ old_linehook = lua_setlinehook((lua_LHFunction)lstop); diff --git a/lzio.c b/lzio.c @@ -1,5 +1,5 @@ /* -** $Id: lzio.c,v 1.7 1999/03/05 13:15:50 roberto Exp roberto $ +** $Id: lzio.c,v 1.8 1999/08/16 20:52:00 roberto Exp roberto $ ** a generic input stream interface ** See Copyright Notice in lua.h */ @@ -16,6 +16,7 @@ /* ----------------------------------------------------- memory buffers --- */ static int zmfilbuf (ZIO* z) { + (void)z; /* to avoid warnings */ return EOZ; }