From 0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 27 Jul 2024 13:32:59 -0300 Subject: Added gcc option '-Wconversion' No warnings for standard numerical types. Still pending alternative numerical types. --- lfunc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lfunc.h') diff --git a/lfunc.h b/lfunc.h index 3be265ef..162b55ec 100644 --- a/lfunc.h +++ b/lfunc.h @@ -11,11 +11,11 @@ #include "lobject.h" -#define sizeCclosure(n) (cast_int(offsetof(CClosure, upvalue)) + \ - cast_int(sizeof(TValue)) * (n)) +#define sizeCclosure(n) \ + (offsetof(CClosure, upvalue) + sizeof(TValue) * cast_uint(n)) -#define sizeLclosure(n) (cast_int(offsetof(LClosure, upvals)) + \ - cast_int(sizeof(TValue *)) * (n)) +#define sizeLclosure(n) \ + (offsetof(LClosure, upvals) + sizeof(TValue *) * cast_uint(n)) /* test whether thread is in 'twups' list */ -- cgit v1.2.3-55-g6feb