diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-12-28 11:44:54 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-12-28 11:44:54 -0200 |
commit | 766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f (patch) | |
tree | 96fbaa15baec33d4f14b27df79778e766ef46f57 /llex.c | |
parent | 4c94d8cc2cbeac74ae3618b1322c3f3d3ec166ea (diff) | |
download | lua-766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f.tar.gz lua-766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f.tar.bz2 lua-766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f.zip |
to avoid warnings about "typecast" (Visual C++)
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 1.25 1998/12/03 15:45:15 roberto Exp $ | 2 | ** $Id: llex.c,v 1.26 1998/12/27 20:25:20 roberto Exp roberto $ |
3 | ** Lexical Analizer | 3 | ** Lexical Analizer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -61,7 +61,7 @@ void luaX_error (LexState *ls, char *s) { | |||
61 | 61 | ||
62 | void luaX_token2str (int token, char *s) { | 62 | void luaX_token2str (int token, char *s) { |
63 | if (token < 255) { | 63 | if (token < 255) { |
64 | s[0] = token; | 64 | s[0] = (char)token; |
65 | s[1] = '\0'; | 65 | s[1] = '\0'; |
66 | } | 66 | } |
67 | else | 67 | else |
@@ -138,7 +138,7 @@ static void readname (LexState *LS, char *buff) | |||
138 | buff[PRAGMASIZE] = 0; | 138 | buff[PRAGMASIZE] = 0; |
139 | luaX_syntaxerror(LS, "pragma too long", buff); | 139 | luaX_syntaxerror(LS, "pragma too long", buff); |
140 | } | 140 | } |
141 | buff[i++] = LS->current; | 141 | buff[i++] = (char)LS->current; |
142 | next(LS); | 142 | next(LS); |
143 | } | 143 | } |
144 | buff[i] = 0; | 144 | buff[i] = 0; |
@@ -344,7 +344,7 @@ int luaX_lex (LexState *LS) { | |||
344 | c = 10*c + (LS->current-'0'); | 344 | c = 10*c + (LS->current-'0'); |
345 | next(LS); | 345 | next(LS); |
346 | } while (++i<3 && isdigit(LS->current)); | 346 | } while (++i<3 && isdigit(LS->current)); |
347 | if (c > (unsigned char)c) | 347 | if (c != (unsigned char)c) |
348 | luaX_error(LS, "escape sequence too large"); | 348 | luaX_error(LS, "escape sequence too large"); |
349 | save(c); | 349 | save(c); |
350 | } | 350 | } |