Fixed windows build warnings

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14574 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-12-05 10:37:20 +00:00
parent 1bcb944ddc
commit 1ce8029f39
5 changed files with 9 additions and 12 deletions

View File

@@ -600,7 +600,7 @@ static int skipBOM (LoadF *lf) {
do {
c = getc(lf->f);
if (c == EOF || c != *(const unsigned char *)p++) return c;
lf->buff[lf->n++] = c; /* to be read by the parser */
lf->buff[lf->n++] = (char)c; /* to be read by the parser */
} while (*p != '\0');
lf->n = 0; /* prefix matched; discard it */
return getc(lf->f); /* return next character */
@@ -650,7 +650,7 @@ LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename,
skipcomment(&lf, &c); /* re-read initial portion */
}
if (c != EOF)
lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */
lf.buff[lf.n++] = (char)c; /* 'c' is the first character of the stream */
status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode);
readstatus = ferror(lf.f);
if (filename) fclose(lf.f); /* close file (even in case of errors) */

View File

@@ -270,7 +270,7 @@ void luaK_checkstack (FuncState *fs, int n) {
void luaK_reserveregs (FuncState *fs, int n) {
luaK_checkstack(fs, n);
fs->freereg += n;
fs->freereg += (lu_byte)(n);
}
@@ -702,8 +702,8 @@ static void codenot (FuncState *fs, expdesc *e) {
void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
lua_assert(!hasjumps(t));
t->u.ind.t = t->u.info;
t->u.ind.idx = luaK_exp2RK(fs, k);
t->u.ind.t = (lu_byte)t->u.info;
t->u.ind.idx = (short)luaK_exp2RK(fs, k);
t->u.ind.vt = (t->k == VUPVAL) ? VUPVAL
: check_exp(vkisinreg(t->k), VLOCAL);
t->k = VINDEXED;
@@ -876,6 +876,6 @@ void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) {
}
else
luaX_syntaxerror(fs->ls, "constructor too long");
fs->freereg = base + 1; /* free registers with list values */
fs->freereg = (lu_byte)(base + 1); /* free registers with list values */
}