@@ -151,7 +151,7 @@ inline bool tointegerns(const TValue* o, lua_Integer* i) noexcept {
151151#define intop (op,v1,v2 ) l_castU2S(l_castS2U(v1) op l_castS2U (v2))
152152
153153/* Forward declaration for luaV_equalobj (defined in lvm.cpp) */
154- LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2);
154+ [[nodiscard]] LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2);
155155
156156inline int luaV_rawequalobj (const TValue* t1, const TValue* t2) noexcept {
157157 return *t1 == *t2; /* Use operator== for raw equality */
@@ -224,16 +224,16 @@ inline void luaV_finishfastset(lua_State* L, const TValue* t, const TValue* v) n
224224** Shift right is the same as shift left with a negative 'y'
225225*/
226226/* Forward declaration for luaV_shiftl (full declaration below) */
227- LUAI_FUNC lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y);
227+ [[nodiscard]] LUAI_FUNC lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y);
228228
229229inline lua_Integer luaV_shiftr (lua_Integer x, lua_Integer y) noexcept {
230230 return luaV_shiftl (x, intop (-, 0 , y));
231231}
232232
233233
234234
235- LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
236- LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);
235+ [[nodiscard]] LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
236+ [[nodiscard]] LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);
237237#ifndef luaV_flttointeger_declared
238238#define luaV_flttointeger_declared
239239LUAI_FUNC int luaV_flttointeger (lua_Number n, lua_Integer *p, F2Imod mode);
@@ -245,9 +245,9 @@ LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
245245LUAI_FUNC void luaV_finishOp (lua_State *L);
246246LUAI_FUNC void luaV_execute (lua_State *L, CallInfo *ci);
247247LUAI_FUNC void luaV_concat (lua_State *L, int total);
248- LUAI_FUNC lua_Integer luaV_idiv (lua_State *L, lua_Integer x, lua_Integer y);
249- LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y);
250- LUAI_FUNC lua_Number luaV_modf (lua_State *L, lua_Number x, lua_Number y);
248+ [[nodiscard]] LUAI_FUNC lua_Integer luaV_idiv (lua_State *L, lua_Integer x, lua_Integer y);
249+ [[nodiscard]] LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y);
250+ [[nodiscard]] LUAI_FUNC lua_Number luaV_modf (lua_State *L, lua_Number x, lua_Number y);
251251LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb);
252252
253253#endif
0 commit comments