diff options
author | ThePhD <phdofthehouse@gmail.com> | 2017-10-04 08:23:09 -0400 |
---|---|---|
committer | ThePhD <phdofthehouse@gmail.com> | 2017-10-04 08:23:09 -0400 |
commit | 3615e44bbee382d2185534445c00913e67852db1 (patch) | |
tree | b231730217df8f635734467d2f186a625d3d0900 | |
parent | db8446dfae8bc8d03fd4dc8a845bfba104b9b372 (diff) | |
download | lua-compat-5.3-3615e44bbee382d2185534445c00913e67852db1.tar.gz lua-compat-5.3-3615e44bbee382d2185534445c00913e67852db1.tar.bz2 lua-compat-5.3-3615e44bbee382d2185534445c00913e67852db1.zip |
fix VC warnings for integer down-conversions to char
-rw-r--r-- | c-api/compat-5.3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c index 09c60dd..b82c654 100644 --- a/c-api/compat-5.3.c +++ b/c-api/compat-5.3.c | |||
@@ -515,7 +515,7 @@ static int compat53_skipBOM (compat53_LoadF *lf) { | |||
515 | do { | 515 | do { |
516 | c = getc(lf->f); | 516 | c = getc(lf->f); |
517 | if (c == EOF || c != *(const unsigned char *)p++) return c; | 517 | if (c == EOF || c != *(const unsigned char *)p++) return c; |
518 | lf->buff[lf->n++] = c; /* to be read by the parser */ | 518 | lf->buff[lf->n++] = (char)c; /* to be read by the parser */ |
519 | } while (*p != '\0'); | 519 | } while (*p != '\0'); |
520 | lf->n = 0; /* prefix matched; discard it */ | 520 | lf->n = 0; /* prefix matched; discard it */ |
521 | return getc(lf->f); /* return next character */ | 521 | return getc(lf->f); /* return next character */ |
@@ -590,7 +590,7 @@ COMPAT53_API int luaL_loadfilex (lua_State *L, const char *filename, const char | |||
590 | compat53_skipcomment(&lf, &c); /* re-read initial portion */ | 590 | compat53_skipcomment(&lf, &c); /* re-read initial portion */ |
591 | } | 591 | } |
592 | if (c != EOF) | 592 | if (c != EOF) |
593 | lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */ | 593 | lf.buff[lf.n++] = (char)c; /* 'c' is the first character of the stream */ |
594 | status = lua_load(L, &compat53_getF, &lf, lua_tostring(L, -1), mode); | 594 | status = lua_load(L, &compat53_getF, &lf, lua_tostring(L, -1), mode); |
595 | readstatus = ferror(lf.f); | 595 | readstatus = ferror(lf.f); |
596 | if (filename) fclose(lf.f); /* close file (even in case of errors) */ | 596 | if (filename) fclose(lf.f); /* close file (even in case of errors) */ |