Fixed conversion warnings from clang

Plus some other details. (Option '-Wuninitialized' was removed from
the makefile because it is already enabled by -Wall.)
This commit is contained in:
Roberto Ierusalimschy
2025-01-14 16:24:46 -03:00
parent 10e931da82
commit 3cdd49c94a
9 changed files with 17 additions and 13 deletions

7
llex.c
View File

@@ -349,9 +349,14 @@ static int readhexaesc (LexState *ls) {
}
/*
** When reading a UTF-8 escape sequence, save everything to the buffer
** for error reporting in case of errors; 'i' counts the number of
** saved characters, so that they can be removed if case of success.
*/
static unsigned long readutf8esc (LexState *ls) {
unsigned long r;
int i = 4; /* chars to be removed: '\', 'u', '{', and first digit */
int i = 4; /* number of chars to be removed: start with #"\u{X" */
save_and_next(ls); /* skip 'u' */
esccheck(ls, ls->current == '{', "missing '{'");
r = cast_ulong(gethexa(ls)); /* must have at least one digit */