- use custom offsetof() macro

src/scripting/vm/jit_call.cpp:164:38: warning: offset of on non-standard-layout type 'VMScriptFunction' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:87:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:96:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:257:53: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
This commit is contained in:
alexey.lysiuk 2018-11-18 12:48:50 +02:00
commit 4624c6e6a3
2 changed files with 5 additions and 5 deletions

View file

@ -161,7 +161,7 @@ void JitCompiler::EmitScriptCall(asmjit::X86Gp vmfunc, asmjit::X86Gp paramsptr)
using namespace asmjit;
auto scriptcall = newTempIntPtr();
cc.mov(scriptcall, x86::ptr(vmfunc, offsetof(VMScriptFunction, ScriptCall)));
cc.mov(scriptcall, x86::ptr(vmfunc, myoffsetof(VMScriptFunction, ScriptCall)));
auto result = newResultInt32();
auto call = cc.call(scriptcall, FuncSignature5<int, VMFunction *, VMValue*, int, VMReturn*, int>());