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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user