commit 5ba54aa0b94bf4491a5e92872ff8e57458f38270 from: Sergey Bronnikov date: Fri Aug 09 07:39:53 2024 UTC tests: fix compiler warning ``` [60/62] Building CXX object tests/capi/luaL_loadbuffer_proto/CMakeFiles/luaL_loadbuffer_proto_test.dir/luaL_loadbuffer_proto_test.cc.o /home/runner/work/lua-c-api-tests/lua-c-api-tests/tests/capi/luaL_loadbuffer_proto/luaL_loadbuffer_proto_test.cc:308:30: warning: missing field 'B' initializer [-Wmissing-field-initializers] struct str_Writer state = {0}; ^ 1 warning generated. ``` commit - 0bb1334c14466593d539da9fd6782ed09d7f511d commit + 5ba54aa0b94bf4491a5e92872ff8e57458f38270 blob - 53d781b4cf9b2e11bb62894d73fe1634903f71ec blob + 4e90320ff3bdfabdf4aa1c764c88355c1eda550c --- tests/capi/luaL_loadbuffer_proto/luaL_loadbuffer_proto_test.cc +++ tests/capi/luaL_loadbuffer_proto/luaL_loadbuffer_proto_test.cc @@ -305,7 +305,8 @@ luaL_loadbytecode(lua_State *L, const char *buff, size } /* Dump a Lua bytecode to a buffer. */ - struct str_Writer state = {0}; + struct str_Writer state; + memset(&state, 0, sizeof(struct str_Writer)); #if LUA_VERSION_NUM < 503 rc = lua_dump(L, writer, &state); #else /* Lua 5.3+ */