[syslinux:master] lua: unused optional arguments can go

syslinux-bot for Ferenc Wágner wferi at niif.hu
Sat Feb 14 11:09:23 PST 2015


Commit-ID:  7e7fbc4e6512ae225f0f1a2f6dde5ea233f8a788
Gitweb:     http://www.syslinux.org/commit/7e7fbc4e6512ae225f0f1a2f6dde5ea233f8a788
Author:     Ferenc Wágner <wferi at niif.hu>
AuthorDate: Fri, 10 Oct 2014 11:50:04 +0200
Committer:  Ferenc Wágner <wferi at niif.hu>
CommitDate: Sun, 12 Oct 2014 10:13:14 +0200

lua: unused optional arguments can go

Not expecting them does not cause any problems, they are ignored by Lua anyway.

Signed-off-by: Ferenc Wágner <wferi at niif.hu>

---
 com32/lua/src/syslinux.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/com32/lua/src/syslinux.c b/com32/lua/src/syslinux.c
index 6b57144..076534f 100644
--- a/com32/lua/src/syslinux.c
+++ b/com32/lua/src/syslinux.c
@@ -144,14 +144,9 @@ static int sl_boot_linux(lua_State * L)
     size_t kernel_len;
     struct initramfs *initramfs;
     char *newcmdline;
-    uint32_t mem_limit = luaL_optint(L, 3, 0);
-    uint16_t video_mode = luaL_optint(L, 4, 0);
     int ret;
     char **argv, **argp, *arg, *p;
 
-    (void)mem_limit;
-    (void)video_mode;
-
     ret = __parse_argv(&argv, cmdline);
 
     newcmdline = malloc(strlen(kernel) + 12);
@@ -328,11 +323,6 @@ static int sl_boot_it(lua_State * L)
     const syslinux_file *kernel = luaL_checkudata(L, 1, SYSLINUX_FILE);
     struct initramfs *initramfs = luaL_checkudata(L, 2, SYSLINUX_FILE);
     const char *cmdline = luaL_optstring(L, 3, "");
-    uint32_t mem_limit = luaL_optint(L, 4, 0);
-    uint16_t video_mode = luaL_optint(L, 5, 0);
-    /* Preventing gcc to complain about unused variables */
-    (void)video_mode;
-    (void)mem_limit;
 
     return syslinux_boot_linux(kernel->data, kernel->size,
 			       initramfs, NULL, (char *)cmdline);


More information about the Syslinux-commits mailing list