Add (void*) casts to memcpy/memset invocations to appease GCC 8.

A lot of these classes are not *technically* "trivially copyable"
for one reason or another, but in all of these cases it seems
OK to me to use memcpy/memset on them. Adding a cast to void*
tells GCC that "I know what I'm doing here" and shuts up the
warning.
This commit is contained in:
Augustin Cavalier
2019-05-24 14:21:37 -04:00
parent 38b015579f
commit 1705656eac
10 changed files with 116 additions and 115 deletions
@@ -72,7 +72,7 @@ struct ValuePieceLocation {
bool Copy(const ValuePieceLocation& other)
{
memcpy(this, &other, sizeof(ValuePieceLocation));
memcpy((void*)this, (void*)&other, sizeof(ValuePieceLocation));
if (type == VALUE_PIECE_LOCATION_IMPLICIT) {
void* tempValue = malloc(size);
if (tempValue == NULL) {