From b6642907cee0174344b2944eefaf459da23e2541 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 2 Jul 2010 11:19:39 -0700 Subject: [PATCH] lua: quiet warnings about unused variables and functions Quiet gcc warnings about unused variables and functions -- things that are not used in the Syslinux environment at this time. Signed-off-by: H. Peter Anvin --- com32/lua/src/lauxlib.c | 2 ++ com32/lua/src/liolib.c | 4 ++-- com32/lua/src/loadlib.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com32/lua/src/lauxlib.c b/com32/lua/src/lauxlib.c index de528bc..58d196c 100644 --- a/com32/lua/src/lauxlib.c +++ b/com32/lua/src/lauxlib.c @@ -552,7 +552,9 @@ static int errfile (lua_State *L, const char *what, int fnameindex) { LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) { LoadF lf; int status, readstatus; +#if 0 int c; +#endif int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */ lf.extraline = 0; if (filename == NULL) { diff --git a/com32/lua/src/liolib.c b/com32/lua/src/liolib.c index def185d..d979f45 100644 --- a/com32/lua/src/liolib.c +++ b/com32/lua/src/liolib.c @@ -312,7 +312,7 @@ static int read_line (lua_State *L, FILE *f) { } } - +#if 0 /* Not used */ static int read_chars (lua_State *L, FILE *f, size_t n) { size_t rlen; /* how much to read */ size_t nr; /* number of chars actually read */ @@ -329,7 +329,7 @@ static int read_chars (lua_State *L, FILE *f, size_t n) { luaL_pushresult(&b); /* close buffer */ return (n == 0 || lua_objlen(L, -1) > 0); } - +#endif #if 0 static int g_read (lua_State *L, FILE *f, int first) { diff --git a/com32/lua/src/loadlib.c b/com32/lua/src/loadlib.c index 906b47e..b6f4cc6 100644 --- a/com32/lua/src/loadlib.c +++ b/com32/lua/src/loadlib.c @@ -590,6 +590,7 @@ static int ll_seeall (lua_State *L) { static void setpath (lua_State *L, const char *fieldname, const char *envname, const char *def) { const char *path = /*getenv(envname)*/ NULL; + (void)envname; /* Shut up gcc */ if (path == NULL) /* no environment variable? */ lua_pushstring(L, def); /* use default */ else { -- 2.7.4