Well, this is probably a really simple warning to fix, but I didn't figure it out yet. Some time ago, I made an update for my uint256 class, and after that, I get this warning:
base58.h:261:52: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class uint256’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(&id, &vchData[0], HASH_LEN_BYTES);
This is the function where is the memcpy:
bool GetKeyID(CKeyID &keyID) const {
if (!IsValid())
return false;
switch (nVersion) {
case PUBKEY_ADDRESS:
case PUBKEY_ADDRESS_TEST: {
uint256 id;
memcpy(&id, &vchData[0], HASH_LEN_BYTES);
keyID = CKeyID(id);
return true;
}
default: return false;
}
}
This is my uint256 class: uint256.h