Fix minor gcc build errors

* for gcc version >= 9.3.0
* fix errors about -Werror=class-memaccess and -Werror=ignored-qualifiers

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2021-10-08 14:45:42 +09:00 committed by Patrick Kim
commit 9f156c6dc6
3 changed files with 5 additions and 5 deletions

View file

@ -440,7 +440,7 @@ Value Script::execute(ExecutionState& state, bool isExecuteOnEvalFunction, bool
} else {
registerFile = CustomAllocator<Value>().allocate(registerFileSize);
// we need to reset allocated memory because customAllocator read it
memset(registerFile, 0, sizeof(Value) * registerFileSize);
memset(static_cast<void*>(registerFile), 0, sizeof(Value) * registerFileSize);
}
registerFile[0] = Value();
Value* stackStorage = registerFile + byteCodeBlock->m_requiredRegisterFileSizeInValueSize;
@ -1055,7 +1055,7 @@ Script::ModuleExecutionResult Script::moduleExecute(ExecutionState& state, Optio
} else {
registerFile = CustomAllocator<Value>().allocate(registerFileSize);
// we need to reset allocated memory because customAllocator read it
memset(registerFile, 0, sizeof(Value) * registerFileSize);
memset(static_cast<void*>(registerFile), 0, sizeof(Value) * registerFileSize);
}
registerFile[0] = Value();