From e901e0feaee4a32e81dbc1e595c2527f329d40e8 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 23 Nov 1994 12:39:52 -0200 Subject: modifications to avoid warnings when compiling yacc code --- lua.stx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lua.stx b/lua.stx index 6a793df9..cd762415 100644 --- a/lua.stx +++ b/lua.stx @@ -1,6 +1,6 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 3.9 1994/11/17 21:11:37 roberto Exp roberto $"; +char *rcs_luastx = "$Id: lua.stx,v 3.10 1994/11/22 15:50:46 roberto Exp roberto $"; #include #include @@ -14,6 +14,14 @@ char *rcs_luastx = "$Id: lua.stx,v 3.9 1994/11/17 21:11:37 roberto Exp roberto $ #include "table.h" #include "lua.h" + +/* to avoid warnings generated by yacc */ +int yyparse (void); +#define malloc luaI_malloc +#define realloc luaI_realloc +#define free luaI_free + + #ifndef LISTING #define LISTING 0 #endif @@ -701,7 +709,7 @@ static void codeIf (Long thenAdd, Long elseAdd) code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1)); } -void yyerror (char *s) +static void yyerror (char *s) { static char msg[256]; sprintf (msg,"%s near \"%s\" at line %d in file \"%s\"", @@ -709,7 +717,7 @@ void yyerror (char *s) lua_error (msg); } -int yywrap (void) +static int yywrap (void) { return 1; } -- cgit v1.2.3-55-g6feb