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

4
lmem.h
View File

@@ -39,11 +39,11 @@
** Computes the minimum between 'n' and 'MAX_SIZET/sizeof(t)', so that
** the result is not larger than 'n' and cannot overflow a 'size_t'
** when multiplied by the size of type 't'. (Assumes that 'n' is an
** 'int' or 'unsigned int' and that 'int' is not larger than 'size_t'.)
** 'int' and that 'int' is not larger than 'size_t'.)
*/
#define luaM_limitN(n,t) \
((cast_sizet(n) <= MAX_SIZET/sizeof(t)) ? (n) : \
cast_uint((MAX_SIZET/sizeof(t))))
cast_int((MAX_SIZET/sizeof(t))))
/*