Skip to content

Commit

Permalink
com32/lua/src/syslinux.c: remove variables set but not used
Browse files Browse the repository at this point in the history
gcc 4.6 warns on variables set but not used, so remove them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
H. Peter Anvin committed Mar 16, 2011
1 parent 585921d commit 72ac6e1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions com32/lua/src/syslinux.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 72ac6e1

Please sign in to comment.