diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-23 12:39:52 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-23 12:39:52 -0200 |
commit | e901e0feaee4a32e81dbc1e595c2527f329d40e8 (patch) | |
tree | ef0255657091f811d300b3c190866c5ab428fa78 | |
parent | d490555ec9d5efb886211f735694d4e7dd0c166d (diff) | |
download | lua-e901e0feaee4a32e81dbc1e595c2527f329d40e8.tar.gz lua-e901e0feaee4a32e81dbc1e595c2527f329d40e8.tar.bz2 lua-e901e0feaee4a32e81dbc1e595c2527f329d40e8.zip |
modifications to avoid warnings when compiling yacc code
-rw-r--r-- | lua.stx | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 3.9 1994/11/17 21:11:37 roberto Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 3.10 1994/11/22 15:50:46 roberto Exp roberto $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -14,6 +14,14 @@ char *rcs_luastx = "$Id: lua.stx,v 3.9 1994/11/17 21:11:37 roberto Exp roberto $ | |||
14 | #include "table.h" | 14 | #include "table.h" |
15 | #include "lua.h" | 15 | #include "lua.h" |
16 | 16 | ||
17 | |||
18 | /* to avoid warnings generated by yacc */ | ||
19 | int yyparse (void); | ||
20 | #define malloc luaI_malloc | ||
21 | #define realloc luaI_realloc | ||
22 | #define free luaI_free | ||
23 | |||
24 | |||
17 | #ifndef LISTING | 25 | #ifndef LISTING |
18 | #define LISTING 0 | 26 | #define LISTING 0 |
19 | #endif | 27 | #endif |
@@ -701,7 +709,7 @@ static void codeIf (Long thenAdd, Long elseAdd) | |||
701 | code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1)); | 709 | code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1)); |
702 | } | 710 | } |
703 | 711 | ||
704 | void yyerror (char *s) | 712 | static void yyerror (char *s) |
705 | { | 713 | { |
706 | static char msg[256]; | 714 | static char msg[256]; |
707 | sprintf (msg,"%s near \"%s\" at line %d in file \"%s\"", | 715 | sprintf (msg,"%s near \"%s\" at line %d in file \"%s\"", |
@@ -709,7 +717,7 @@ void yyerror (char *s) | |||
709 | lua_error (msg); | 717 | lua_error (msg); |
710 | } | 718 | } |
711 | 719 | ||
712 | int yywrap (void) | 720 | static int yywrap (void) |
713 | { | 721 | { |
714 | return 1; | 722 | return 1; |
715 | } | 723 | } |