Codechange: Silence -Wclass-memaccess warnings with GCC8

This commit is contained in:
Charles Pigott
2018-05-13 18:34:57 +01:00
committed by frosch
parent e1b9187e9b
commit 5f86e1a390
9 changed files with 12 additions and 15 deletions

View File

@@ -90,7 +90,7 @@ public:
{
_vals[idx].~T();
if(idx < (_size - 1)) {
memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - (size_t)idx - 1));
memmove(static_cast<void *>(&_vals[idx]), &_vals[idx+1], sizeof(T) * (_size - (size_t)idx - 1));
}
_size--;
}

View File

@@ -378,8 +378,7 @@ bool SQVM::StartCall(SQClosure *closure,SQInteger target,SQInteger args,SQIntege
}
if (!tailcall) {
CallInfo lc;
memset(&lc, 0, sizeof(lc));
CallInfo lc = {};
lc._generator = NULL;
lc._etraps = 0;
lc._prevstkbase = (SQInt32) ( stackbase - _stackbase );
@@ -1159,8 +1158,7 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb
SQInteger oldtop = _top;
SQInteger oldstackbase = _stackbase;
_top = stackbase + nargs;
CallInfo lci;
memset(&lci, 0, sizeof(lci));
CallInfo lci = {};
lci._closure = nclosure;
lci._generator = NULL;
lci._etraps = 0;