From 45b173cbf89597123267a69bace778cf498d6c98 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 21 Jul 2001 21:59:36 -0300 Subject: [PATCH] warnings/details --- lapi.c | 4 ++-- lauxlib.h | 4 ++-- liolib.c | 12 ++---------- llex.c | 4 ++-- llex.h | 4 ++-- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/lapi.c b/lapi.c index 0d23b4c3..60877553 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.147 2001/06/26 13:20:45 roberto Exp roberto $ +** $Id: lapi.c,v 1.148 2001/07/12 18:11:58 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -489,7 +489,7 @@ LUA_API int lua_ref (lua_State *L, int lock) { lua_rawseti(L, -2, ref); lua_pop(L, 1); /* remove registry */ } - lua_pushliteral(L, "n"); + lua_pushliteral(L, l_s("n")); lua_pushnumber(L, ref); lua_settable(L, -3); lua_pop(L, 2); diff --git a/lauxlib.h b/lauxlib.h index 9f75f741..eef34860 100644 --- a/lauxlib.h +++ b/lauxlib.h @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.h,v 1.34 2001/02/23 17:17:25 roberto Exp roberto $ +** $Id: lauxlib.h,v 1.35 2001/04/06 21:17:37 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -85,7 +85,7 @@ typedef struct luaL_Buffer { } luaL_Buffer; #define luaL_putchar(B,c) \ - ((void)((B)->p < &(B)->buffer[LUAL_BUFFERSIZE] || luaL_prepbuffer(B)), \ + ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \ (*(B)->p++ = (lua_char)(c))) #define luaL_addsize(B,n) ((B)->p += (n)) diff --git a/liolib.c b/liolib.c index 942e9388..0d9c6b3e 100644 --- a/liolib.c +++ b/liolib.c @@ -1,11 +1,10 @@ /* -** $Id: liolib.c,v 1.119 2001/07/12 18:11:58 roberto Exp roberto $ +** $Id: liolib.c,v 1.120 2001/07/16 18:48:31 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ -#include #include #include #include @@ -25,13 +24,6 @@ #endif -#ifndef l_realloc -#define l_malloc(s) malloc(s) -#define l_realloc(b,os,s) realloc(b, s) -#define l_free(b, os) free(b) -#endif - - #ifdef POPEN /* FILE *popen(); @@ -330,7 +322,7 @@ static int io_read (lua_State *L) { success = 1; /* always success */ break; case l_c('w'): /* word */ - lua_error(L, "option `*w' is deprecated"); + lua_error(L, l_s("option `*w' is deprecated")); break; case l_c('u'): { /* read until */ size_t pl = lua_strlen(L, n) - 2; diff --git a/llex.c b/llex.c index 6ca4ef75..68627f13 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.87 2001/06/15 20:36:57 roberto Exp roberto $ +** $Id: llex.c,v 1.88 2001/06/20 21:07:57 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -377,7 +377,7 @@ int luaX_lex (LexState *LS, SemInfo *seminfo) { return TK_NAME; } else { - int c = LS->current; + l_charint c = LS->current; if (iscntrl(c)) luaX_invalidchar(LS, c); next(LS); diff --git a/llex.h b/llex.h index 6d0cba47..f4577551 100644 --- a/llex.h +++ b/llex.h @@ -1,5 +1,5 @@ /* -** $Id: llex.h,v 1.35 2001/03/06 14:46:54 roberto Exp roberto $ +** $Id: llex.h,v 1.36 2001/06/20 21:07:57 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -49,7 +49,7 @@ typedef struct Token { typedef struct LexState { - int current; /* current character */ + l_charint current; /* current character */ Token t; /* current token */ Token lookahead; /* look ahead token */ struct FuncState *fs; /* `FuncState' is private to the parser */