Skip to content

Commit cabcf02

Browse files
committed
tests/capi: fix compiler warning
[ 66%] Built target lua_mutate /home/sergeyb/sources/lua-c-api-tests/tests/capi/lua_load_test.cc:62:14: warning: unused variable 'mode' [-Wunused-variable] 62 | const char *mode = "t"; | ^~~~
1 parent 40d0d82 commit cabcf02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/capi/lua_load_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
5959
dt test_data;
6060
test_data.fdp = &fdp;
6161

62-
const char *mode = "t";
6362
#if LUA_VERSION_NUM == 501
6463
int res = lua_load(L, Reader, &test_data, "libFuzzer");
6564
#else /* Lua 5.3+ */
65+
const char *mode = "t";
6666
int res = lua_load(L, Reader, &test_data, "libFuzzer", mode);
6767
#endif /* LUA_VERSION_NUM */
6868
if (res == LUA_OK) {

0 commit comments

Comments
 (0)