diff options
Diffstat (limited to 'source/luametatex/source/luarest')
-rw-r--r-- | source/luametatex/source/luarest/lmtiolibext.c | 4 | ||||
-rw-r--r-- | source/luametatex/source/luarest/lmtsparselib.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/luametatex/source/luarest/lmtiolibext.c b/source/luametatex/source/luarest/lmtiolibext.c index 319eb40c6..b78735504 100644 --- a/source/luametatex/source/luarest/lmtiolibext.c +++ b/source/luametatex/source/luarest/lmtiolibext.c @@ -1095,7 +1095,7 @@ static int fiolib_readcline(lua_State *L) FILE *f = lmt_valid_file(L); if (f) { luaL_Buffer buf; - int c; + int c = 0; int n = 0; luaL_buffinit(L, &buf); do { @@ -1178,7 +1178,7 @@ static int fiolib_readcstring(lua_State *L) FILE *f = lmt_valid_file(L); if (f) { luaL_Buffer buf; - int c; + int c = 0; int n = 0; luaL_buffinit(L, &buf); do { diff --git a/source/luametatex/source/luarest/lmtsparselib.c b/source/luametatex/source/luarest/lmtsparselib.c index a5b599cea..74ecb63f4 100644 --- a/source/luametatex/source/luarest/lmtsparselib.c +++ b/source/luametatex/source/luarest/lmtsparselib.c @@ -52,17 +52,17 @@ static int sparselib_new(lua_State *L) switch (bytes) { case 1: { - unsigned char d = (defval < 0 ? 0 : (defval > 0xFF ? 0xFF : defval)); + int d = defval < 0 ? 0 : (defval > 0xFF ? 0xFF : defval); for (int i = 0; i <= 3; i++) { - item.uchar_value[i] = d ; + item.uchar_value[i] = (unsigned char) d; } break; } case 2: { - unsigned short d = (defval < 0 ? 0 : (defval > 0xFFFF ? 0xFFFF : defval)); + int d = defval < 0 ? 0 : (defval > 0xFFFF ? 0xFFFF : defval); for (int i = 0; i <= 1; i++) { - item.ushort_value[i] = d ; + item.ushort_value[i] = (unsigned short) d; } break; } |