2009-05-16 Pavel Roskin <proski@gnu.org>
* script/lua/grub_lib.c (grub_lua_getenv): Make name and value const to avoid a warning. (grub_lua_setenv): Likewise. * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for lmsg to fix a warning.
This commit is contained in:
parent
7dd10fceb4
commit
cb5a0f40a3
3 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2009-05-16 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* script/lua/grub_lib.c (grub_lua_getenv): Make name and value
|
||||
const to avoid a warning.
|
||||
(grub_lua_setenv): Likewise.
|
||||
* script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
|
||||
lmsg to fix a warning.
|
||||
|
||||
2009-05-16 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
|
||||
|
|
|
@ -69,7 +69,7 @@ grub_lua_getenv (lua_State *state)
|
|||
n = lua_gettop(state);
|
||||
for (i = 1; i <= n; i++)
|
||||
{
|
||||
char *name, *value;
|
||||
const char *name, *value;
|
||||
|
||||
name = lua_tostring (state, i);
|
||||
value = grub_env_get (name);
|
||||
|
@ -85,7 +85,7 @@ grub_lua_getenv (lua_State *state)
|
|||
static int
|
||||
grub_lua_setenv (lua_State *state)
|
||||
{
|
||||
char *name, *value;
|
||||
const char *name, *value;
|
||||
|
||||
if (lua_gettop(state) != 2)
|
||||
return 0;
|
||||
|
|
|
@ -51,7 +51,7 @@ grub_lua_parse_line (char *line, grub_reader_getline_t getline)
|
|||
|
||||
if (r == LUA_ERRSYNTAX)
|
||||
{
|
||||
int lmsg;
|
||||
size_t lmsg;
|
||||
const char *msg = lua_tolstring(state, -1, &lmsg);
|
||||
const char *tp = msg + lmsg - (sizeof(LUA_QL("<eof>")) - 1);
|
||||
if (grub_strstr(msg, LUA_QL("<eof>")) == tp)
|
||||
|
|
Loading…
Reference in a new issue