diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-06 15:17:33 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-06 15:17:33 -0300 |
commit | 000d081fd0966ba8f39178186d30319df37d631f (patch) | |
tree | 9260d75fcdf08fbf118330dc87316a6b52770c61 | |
parent | 65d66ba27592271cda71caefe231f9ee2d909d5c (diff) | |
download | lua-000d081fd0966ba8f39178186d30319df37d631f.tar.gz lua-000d081fd0966ba8f39178186d30319df37d631f.tar.bz2 lua-000d081fd0966ba8f39178186d30319df37d631f.zip |
warnings from other compilers
-rw-r--r-- | ldebug.c | 11 | ||||
-rw-r--r-- | liolib.c | 3 | ||||
-rw-r--r-- | lopcodes.h | 9 | ||||
-rw-r--r-- | lstate.c | 3 | ||||
-rw-r--r-- | lvm.c | 3 |
5 files changed, 12 insertions, 17 deletions
@@ -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 | ||
477 | void luaG_typeerror (lua_State *L, const TObject *o, const char *op) { | 475 | void 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); |
@@ -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 | } |
@@ -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) | 220 | extern const char *const luaP_opnames[]; /* opcode names */ |
221 | */ | 221 | #endif |
222 | extern const char *const luaP_opnames[]; | ||
223 | 222 | ||
224 | 223 | ||
225 | 224 | ||
@@ -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 | */ |
30 | static int default_panic (lua_State *L) { | 30 | static int default_panic (lua_State *L) { |
31 | UNUSED(L); | ||
31 | return 0; | 32 | return 0; |
32 | } | 33 | } |
33 | 34 | ||
@@ -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; |