aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-06 15:17:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-06 15:17:33 -0300
commit000d081fd0966ba8f39178186d30319df37d631f (patch)
tree9260d75fcdf08fbf118330dc87316a6b52770c61
parent65d66ba27592271cda71caefe231f9ee2d909d5c (diff)
downloadlua-000d081fd0966ba8f39178186d30319df37d631f.tar.gz
lua-000d081fd0966ba8f39178186d30319df37d631f.tar.bz2
lua-000d081fd0966ba8f39178186d30319df37d631f.zip
warnings from other compilers
-rw-r--r--ldebug.c11
-rw-r--r--liolib.c3
-rw-r--r--lopcodes.h9
-rw-r--r--lstate.c3
-rw-r--r--lvm.c3
5 files changed, 12 insertions, 17 deletions
diff --git a/ldebug.c b/ldebug.c
index 2a94dc09..d3925a65 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 1.116 2002/05/15 18:57:44 roberto Exp roberto $ 2** $Id: ldebug.c,v 1.117 2002/05/16 18:39:46 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -434,12 +434,10 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int stackpos,
434 case OP_GETTABLE: { 434 case OP_GETTABLE: {
435 *name = kname(p, GETARG_C(i)); 435 *name = kname(p, GETARG_C(i));
436 return "field"; 436 return "field";
437 break;
438 } 437 }
439 case OP_SELF: { 438 case OP_SELF: {
440 *name = kname(p, GETARG_C(i)); 439 *name = kname(p, GETARG_C(i));
441 return "method"; 440 return "method";
442 break;
443 } 441 }
444 default: break; 442 default: break;
445 } 443 }
@@ -475,11 +473,10 @@ static int isinstack (CallInfo *ci, const TObject *o) {
475 473
476 474
477void luaG_typeerror (lua_State *L, const TObject *o, const char *op) { 475void luaG_typeerror (lua_State *L, const TObject *o, const char *op) {
478 const char *name; 476 const char *name = NULL;
479 const char *t = luaT_typenames[ttype(o)]; 477 const char *t = luaT_typenames[ttype(o)];
480 const char *kind = NULL; 478 const char *kind = (isinstack(L->ci, o)) ?
481 if (isinstack(L->ci, o)) 479 getobjname(L, L->ci, o - L->ci->base, &name) : NULL;
482 kind = getobjname(L, L->ci, o - L->ci->base, &name);
483 if (kind) 480 if (kind)
484 luaG_runerror(L, "attempt to %s %s `%s' (a %s value)", 481 luaG_runerror(L, "attempt to %s %s `%s' (a %s value)",
485 op, kind, name, t); 482 op, kind, name, t);
diff --git a/liolib.c b/liolib.c
index f73aa9bf..31fb4202 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 2.8 2002/06/05 17:42:03 roberto Exp roberto $ 2** $Id: liolib.c,v 2.9 2002/06/06 12:43:08 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -281,7 +281,6 @@ static int g_read (lua_State *L, FILE *f, int first) {
281 break; 281 break;
282 case 'w': /* word */ 282 case 'w': /* word */
283 return luaL_verror(L, "obsolete option `*w'"); 283 return luaL_verror(L, "obsolete option `*w'");
284 break;
285 default: 284 default:
286 return luaL_argerror(L, n, "invalid format"); 285 return luaL_argerror(L, n, "invalid format");
287 } 286 }
diff --git a/lopcodes.h b/lopcodes.h
index fbdec4cf..95b5b373 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.96 2002/05/06 15:51:41 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.97 2002/05/13 13:09:00 roberto Exp roberto $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -216,10 +216,9 @@ extern const lu_byte luaP_opmodes[NUM_OPCODES];
216#define testOpMode(m, b) (luaP_opmodes[m] & (1 << (b))) 216#define testOpMode(m, b) (luaP_opmodes[m] & (1 << (b)))
217 217
218 218
219/* 219#ifdef LUA_OPNAMES
220** opcode names (only included when compiled with LUA_OPNAMES) 220extern const char *const luaP_opnames[]; /* opcode names */
221*/ 221#endif
222extern const char *const luaP_opnames[];
223 222
224 223
225 224
diff --git a/lstate.c b/lstate.c
index 99b4bf75..45f534ca 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.94 2002/05/08 17:34:23 roberto Exp roberto $ 2** $Id: lstate.c,v 1.95 2002/06/03 14:09:57 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -28,6 +28,7 @@ static void close_state (lua_State *L);
28** call `lua_setpanicf' 28** call `lua_setpanicf'
29*/ 29*/
30static int default_panic (lua_State *L) { 30static int default_panic (lua_State *L) {
31 UNUSED(L);
31 return 0; 32 return 0;
32} 33}
33 34
diff --git a/lvm.c b/lvm.c
index 5413c901..8d22e9c1 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 1.234 2002/06/03 14:08:43 roberto Exp roberto $ 2** $Id: lvm.c,v 1.235 2002/06/05 12:34:19 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -531,7 +531,6 @@ StkId luaV_execute (lua_State *L) {
531 if (nresults >= 0) L->top = L->ci->top; 531 if (nresults >= 0) L->top = L->ci->top;
532 goto retentry; 532 goto retentry;
533 } 533 }
534 break;
535 } 534 }
536 case OP_FORLOOP: { 535 case OP_FORLOOP: {
537 lua_Number step, index, limit; 536 lua_Number step, index, limit;