corrected warnings from different compilers (mostly casts and small

details)
This commit is contained in:
Roberto Ierusalimschy
2010-10-25 17:01:37 -02:00
parent 1475cb59bf
commit 4590a89b32
9 changed files with 21 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstrlib.c,v 1.153 2010/05/24 19:34:57 roberto Exp roberto $
** $Id: lstrlib.c,v 1.154 2010/07/02 11:38:13 roberto Exp roberto $
** Standard library for string operations and pattern-matching
** See Copyright Notice in lua.h
*/
@@ -758,9 +758,9 @@ static void addquoted (lua_State *L, luaL_Buffer *b, int arg) {
else if (*s == '\0' || iscntrl(uchar(*s))) {
char buff[10];
if (!isdigit(uchar(*(s+1))))
sprintf(buff, "\\%d", uchar(*s));
sprintf(buff, "\\%d", (int)uchar(*s));
else
sprintf(buff, "\\%03d", uchar(*s));
sprintf(buff, "\\%03d", (int)uchar(*s));
luaL_addstring(b, buff);
}
else