Package kit: Fix -Werror=class-memaccess
Initialize each class members instead of memset() for clearing PackageInfoAttributeValue. Pointed out by gcc8. Change-Id: I8bdb328e2271e49e840b1294dba9cca544805e72 Reviewed-on: https://review.haiku-os.org/c/1114 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
e573a0cfad
commit
752ec5c625
@@ -123,7 +123,14 @@ BPackageInfoAttributeValue::SetTo(BPackageInfoAttributeID id,
|
|||||||
inline void
|
inline void
|
||||||
BPackageInfoAttributeValue::Clear()
|
BPackageInfoAttributeValue::Clear()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof(BPackageInfoAttributeValue));
|
unsignedInt = 0;
|
||||||
|
string = NULL;
|
||||||
|
version = {};
|
||||||
|
resolvable = {};
|
||||||
|
resolvableExpression = {};
|
||||||
|
globalWritableFileInfo = {};
|
||||||
|
userSettingsFileInfo = {};
|
||||||
|
user = {};
|
||||||
attributeID = B_PACKAGE_INFO_ENUM_COUNT;
|
attributeID = B_PACKAGE_INFO_ENUM_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user