[syslinux:master] com32/lua/src/syslinux.c: remove variables set but not used

syslinux-bot for H. Peter Anvin hpa at zytor.com
Wed Mar 16 13:18:49 PDT 2011


Commit-ID:  72ac6e125fa374f12027b3f663c3f8c3a5e886b2
Gitweb:     http://syslinux.zytor.com/commit/72ac6e125fa374f12027b3f663c3f8c3a5e886b2
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Wed, 16 Mar 2011 13:10:36 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Wed, 16 Mar 2011 13:10:36 -0700

com32/lua/src/syslinux.c: remove variables set but not used

gcc 4.6 warns on variables set but not used, so remove them.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 com32/lua/src/syslinux.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/com32/lua/src/syslinux.c b/com32/lua/src/syslinux.c
index f47f888..9b207db 100644
--- a/com32/lua/src/syslinux.c
+++ b/com32/lua/src/syslinux.c
@@ -190,6 +190,9 @@ static int sl_boot_linux(lua_State * L)
     int ret;
     char **argv, **argp, *arg, *p;
 
+    (void)mem_limit;
+    (void)video_mode;
+
     ret = __parse_argv(&argv, cmdline);
 
     newcmdline = malloc(strlen(kernel) + 12);
@@ -397,14 +400,12 @@ static int sl_boot_it(lua_State * L)
     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);
-    int ret;
     /* Preventing gcc to complain about unused variables */
-    video_mode=video_mode;
-    mem_limit=mem_limit;
+    (void)video_mode;
+    (void)mem_limit;
 
-    ret = syslinux_boot_linux(kernel->data, kernel->size, initramfs, (char *)cmdline);
-
-    return 0;
+    return syslinux_boot_linux(kernel->data, kernel->size,
+			       initramfs, (char *)cmdline);
 }
 
 static int sl_derivative(lua_State * L)



More information about the Syslinux-commits mailing list