浏览代码

new warnings with option "-W" (gcc)

Roberto Ierusalimschy 26 年之前
父节点
当前提交
a7fa7bafc8
共有 4 个文件被更改,包括 8 次插入6 次删除
  1. 2 2
      liolib.c
  2. 2 2
      llex.c
  3. 2 1
      lua.c
  4. 2 1
      lzio.c

+ 2 - 2
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++) {

+ 2 - 2
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 */

+ 2 - 1
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);

+ 2 - 1
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;
 }