diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-24 09:42:29 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-24 09:42:29 -0200 |
commit | ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b (patch) | |
tree | 9259d73174e52b96d5bf72eaf6fc06c89237b8e3 /lstrlib.c | |
parent | 463edee2fd6436d9ad6ae9f2f3d36b742416a479 (diff) | |
download | lua-ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b.tar.gz lua-ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b.tar.bz2 lua-ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b.zip |
added some casts to avoid warnings in some compilers
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.204 2014/10/17 16:28:21 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.205 2014/10/20 16:44:54 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1136,10 +1136,10 @@ static void packint (luaL_Buffer *b, lua_Unsigned n, | |||
1136 | char *buff = luaL_prepbuffsize(b, size); | 1136 | char *buff = luaL_prepbuffsize(b, size); |
1137 | int i; | 1137 | int i; |
1138 | for (i = 0; i < size - 1; i++) { | 1138 | for (i = 0; i < size - 1; i++) { |
1139 | buff[islittle ? i : size - 1 - i] = (n & MC); | 1139 | buff[islittle ? i : size - 1 - i] = (char)(n & MC); |
1140 | n = (n >> NB) | mask; | 1140 | n = (n >> NB) | mask; |
1141 | } | 1141 | } |
1142 | buff[islittle ? i : size - 1 - i] = (n & MC); | 1142 | buff[islittle ? i : size - 1 - i] = (char)(n & MC); |
1143 | luaL_addsize(b, size); /* add result to buffer */ | 1143 | luaL_addsize(b, size); /* add result to buffer */ |
1144 | } | 1144 | } |
1145 | 1145 | ||