aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2017-10-09 22:27:34 +0200
committerGitHub <noreply@github.com>2017-10-09 22:27:34 +0200
commitbc91f40919196e6af6371c26f851f8f94da0b15c (patch)
treeb231730217df8f635734467d2f186a625d3d0900
parentdb8446dfae8bc8d03fd4dc8a845bfba104b9b372 (diff)
parent3615e44bbee382d2185534445c00913e67852db1 (diff)
downloadlua-compat-5.3-bc91f40919196e6af6371c26f851f8f94da0b15c.tar.gz
lua-compat-5.3-bc91f40919196e6af6371c26f851f8f94da0b15c.tar.bz2
lua-compat-5.3-bc91f40919196e6af6371c26f851f8f94da0b15c.zip
Merge pull request #38 from ThePhD/warnings/vcxxv0.6
fix VC warnings for integer down-conversions to char
-rw-r--r--c-api/compat-5.3.c4
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) */