mirror of https://github.com/rusefi/lua.git
warnings from Visual C++
This commit is contained in:
parent
8e7451512f
commit
910836fb53
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lbuiltin.c,v 1.66 1999/10/11 16:13:11 roberto Exp roberto $
|
** $Id: lbuiltin.c,v 1.67 1999/10/14 19:13:31 roberto Exp roberto $
|
||||||
** Built-in functions
|
** Built-in functions
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -671,7 +671,7 @@ static void extra_services (void) {
|
||||||
lua_settagmethod(luaL_check_int(2), "gc");
|
lua_settagmethod(luaL_check_int(2), "gc");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: luaL_arg_check(0, 1, "invalid service");
|
default: luaL_argerror(1, "invalid service");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5
liolib.c
5
liolib.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: liolib.c,v 1.46 1999/10/07 19:18:36 roberto Exp roberto $
|
** $Id: liolib.c,v 1.47 1999/10/11 16:06:01 roberto Exp roberto $
|
||||||
** Standard I/O (and system) library
|
** Standard I/O (and system) library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -500,8 +500,7 @@ static void setloc (void) {
|
||||||
|
|
||||||
|
|
||||||
static void io_exit (void) {
|
static void io_exit (void) {
|
||||||
lua_Object o = lua_getparam(1);
|
exit(luaL_opt_int(1, EXIT_FAILURE));
|
||||||
exit(lua_isnumber(o) ? (int)lua_getnumber(o) : 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }====================================================== */
|
/* }====================================================== */
|
||||||
|
|
4
llex.c
4
llex.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: llex.c,v 1.40 1999/10/04 17:51:04 roberto Exp roberto $
|
** $Id: llex.c,v 1.41 1999/10/11 16:13:42 roberto Exp roberto $
|
||||||
** Lexical Analyzer
|
** Lexical Analyzer
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +37,7 @@ void luaX_init (void) {
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<(sizeof(reserved)/sizeof(reserved[0])); i++) {
|
for (i=0; i<(sizeof(reserved)/sizeof(reserved[0])); i++) {
|
||||||
TaggedString *ts = luaS_new(reserved[i]);
|
TaggedString *ts = luaS_new(reserved[i]);
|
||||||
ts->marked = RESERVEDMARK+i; /* reserved word */
|
ts->marked = (unsigned char)(RESERVEDMARK+i); /* reserved word */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
lmem.c
4
lmem.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lmem.c,v 1.17 1999/05/24 17:51:05 roberto Exp roberto $
|
** $Id: lmem.c,v 1.18 1999/08/16 20:52:00 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -129,7 +129,7 @@ void *luaM_realloc (void *block, unsigned long size) {
|
||||||
numblocks++;
|
numblocks++;
|
||||||
*(unsigned long *)newblock = size;
|
*(unsigned long *)newblock = size;
|
||||||
for (i=0;i<MARKSIZE;i++)
|
for (i=0;i<MARKSIZE;i++)
|
||||||
*(newblock+HEADER+size+i) = MARK+i;
|
*(newblock+HEADER+size+i) = (char)(MARK+i);
|
||||||
return newblock+HEADER;
|
return newblock+HEADER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lobject.h,v 1.32 1999/10/11 16:13:11 roberto Exp roberto $
|
** $Id: lobject.h,v 1.33 1999/10/14 19:13:31 roberto Exp roberto $
|
||||||
** Type definitions for Lua objects
|
** Type definitions for Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -170,7 +170,7 @@ typedef struct node {
|
||||||
typedef struct Hash {
|
typedef struct Hash {
|
||||||
int htag;
|
int htag;
|
||||||
Node *node;
|
Node *node;
|
||||||
unsigned int size;
|
int size;
|
||||||
Node *firstfree; /* this position is free; all positions after it are full */
|
Node *firstfree; /* this position is free; all positions after it are full */
|
||||||
struct Hash *next;
|
struct Hash *next;
|
||||||
int marked;
|
int marked;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstring.c,v 1.23 1999/10/11 16:13:11 roberto Exp roberto $
|
** $Id: lstring.c,v 1.24 1999/10/14 19:13:31 roberto Exp roberto $
|
||||||
** String table (keeps all strings handled by Lua)
|
** String table (keeps all strings handled by Lua)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -146,7 +146,7 @@ static TaggedString *insert_s (const char *str, long l,
|
||||||
|
|
||||||
|
|
||||||
static TaggedString *insert_u (void *buff, int tag, stringtable *tb) {
|
static TaggedString *insert_u (void *buff, int tag, stringtable *tb) {
|
||||||
unsigned long h = (unsigned long)buff;
|
unsigned long h = (IntPoint)buff;
|
||||||
int h1 = h%tb->size;
|
int h1 = h%tb->size;
|
||||||
TaggedString *ts;
|
TaggedString *ts;
|
||||||
for (ts = tb->hash[h1]; ts; ts = ts->nexthash)
|
for (ts = tb->hash[h1]; ts; ts = ts->nexthash)
|
||||||
|
@ -160,7 +160,7 @@ static TaggedString *insert_u (void *buff, int tag, stringtable *tb) {
|
||||||
|
|
||||||
|
|
||||||
TaggedString *luaS_createudata (void *udata, int tag) {
|
TaggedString *luaS_createudata (void *udata, int tag) {
|
||||||
int t = ((unsigned int)udata%NUM_HASHUDATA)+NUM_HASHSTR;
|
int t = ((IntPoint)udata%NUM_HASHUDATA)+NUM_HASHSTR;
|
||||||
return insert_u(udata, tag, &L->string_root[t]);
|
return insert_u(udata, tag, &L->string_root[t]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
ltable.c
4
ltable.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltable.c,v 1.25 1999/10/04 17:51:04 roberto Exp roberto $
|
** $Id: ltable.c,v 1.26 1999/10/14 19:13:31 roberto Exp roberto $
|
||||||
** Lua tables (hash)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -63,7 +63,7 @@ static Node *luaH_mainposition (const Hash *t, const TObject *key) {
|
||||||
lua_error("unexpected type to index table");
|
lua_error("unexpected type to index table");
|
||||||
h = 0; /* to avoid warnings */
|
h = 0; /* to avoid warnings */
|
||||||
}
|
}
|
||||||
return &t->node[h%t->size];
|
return &t->node[h%(unsigned int)t->size];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue