'-Wconversion' extended to all options of Lua numbers

This commit is contained in:
Roberto Ierusalimschy
2024-07-27 15:13:21 -03:00
parent 0acd55898d
commit f2206b2abe
8 changed files with 50 additions and 39 deletions

View File

@@ -163,13 +163,15 @@ typedef LUAI_UACINT l_uacInt;
*/
#define ct_diff2sz(df) ((size_t)(df))
/* ptrdiff_t to lua_Integer */
#define ct_diff2S(df) cast_st2S(ct_diff2sz(df))
/*
** Special type equivalent to '(void*)' for functions (to suppress some
** warnings when converting function pointers)
*/
typedef void (*voidf)(void);
/*
** Macro to convert pointer-to-void* to pointer-to-function. This cast
** is undefined according to ISO C, but POSIX assumes that it works.