lua: quiet warnings about unused variables and functions syslinux-4.01
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 2 Jul 2010 18:19:39 +0000 (11:19 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 2 Jul 2010 18:19:39 +0000 (11:19 -0700)
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 <hpa@linux.intel.com>
com32/lua/src/lauxlib.c
com32/lua/src/liolib.c
com32/lua/src/loadlib.c

index de528bc..58d196c 100644 (file)
@@ -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) {
index def185d..d979f45 100644 (file)
@@ -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) {
index 906b47e..b6f4cc6 100644 (file)
@@ -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 {