aboutsummaryrefslogtreecommitdiff
path: root/lmem.h
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 /lmem.h
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 'lmem.h')
-rw-r--r--lmem.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lmem.h b/lmem.h
index 204ce3bc..08358592 100644
--- a/lmem.h
+++ b/lmem.h
@@ -39,11 +39,11 @@
39** Computes the minimum between 'n' and 'MAX_SIZET/sizeof(t)', so that 39** Computes the minimum between 'n' and 'MAX_SIZET/sizeof(t)', so that
40** the result is not larger than 'n' and cannot overflow a 'size_t' 40** the result is not larger than 'n' and cannot overflow a 'size_t'
41** when multiplied by the size of type 't'. (Assumes that 'n' is an 41** when multiplied by the size of type 't'. (Assumes that 'n' is an
42** 'int' or 'unsigned int' and that 'int' is not larger than 'size_t'.) 42** 'int' and that 'int' is not larger than 'size_t'.)
43*/ 43*/
44#define luaM_limitN(n,t) \ 44#define luaM_limitN(n,t) \
45 ((cast_sizet(n) <= MAX_SIZET/sizeof(t)) ? (n) : \ 45 ((cast_sizet(n) <= MAX_SIZET/sizeof(t)) ? (n) : \
46 cast_uint((MAX_SIZET/sizeof(t)))) 46 cast_int((MAX_SIZET/sizeof(t))))
47 47
48 48
49/* 49/*