aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-14 16:24:46 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-14 16:24:46 -0300
commit3cdd49c94a8feed94853ba3a6adaa556fb34fd8d (patch)
tree1f552c966d1fb5f5c23e956e6d98679f02a558b3 /llex.c
parent10e931da82268a9d190c17a9bdb9b1a4b48c2947 (diff)
downloadlua-3cdd49c94a8feed94853ba3a6adaa556fb34fd8d.tar.gz
lua-3cdd49c94a8feed94853ba3a6adaa556fb34fd8d.tar.bz2
lua-3cdd49c94a8feed94853ba3a6adaa556fb34fd8d.zip
Fixed conversion warnings from clang
Plus some other details. (Option '-Wuninitialized' was removed from the makefile because it is already enabled by -Wall.)
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/llex.c b/llex.c
index 3518f0da..1c4227ca 100644
--- a/llex.c
+++ b/llex.c
@@ -349,9 +349,14 @@ static int readhexaesc (LexState *ls) {
349} 349}
350 350
351 351
352/*
353** When reading a UTF-8 escape sequence, save everything to the buffer
354** for error reporting in case of errors; 'i' counts the number of
355** saved characters, so that they can be removed if case of success.
356*/
352static unsigned long readutf8esc (LexState *ls) { 357static unsigned long readutf8esc (LexState *ls) {
353 unsigned long r; 358 unsigned long r;
354 int i = 4; /* chars to be removed: '\', 'u', '{', and first digit */ 359 int i = 4; /* number of chars to be removed: start with #"\u{X" */
355 save_and_next(ls); /* skip 'u' */ 360 save_and_next(ls); /* skip 'u' */
356 esccheck(ls, ls->current == '{', "missing '{'"); 361 esccheck(ls, ls->current == '{', "missing '{'");
357 r = cast_ulong(gethexa(ls)); /* must have at least one digit */ 362 r = cast_ulong(gethexa(ls)); /* must have at least one digit */