mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fixed GCC issues for const initialization
Fixed issues reported by GCC for initialization of const variables
This commit is contained in:
parent
b204451d06
commit
51d63f0e83
@ -428,8 +428,8 @@ ShareObserver::Result ShareObserver::importInsecureContainerInto(const KeeShareS
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto foreign = KeeShare::foreign();
|
auto foreign = KeeShare::foreign();
|
||||||
auto own = KeeShare::own();
|
const auto own = KeeShare::own();
|
||||||
static KeeShareSettings::Sign sign; // invalid sign
|
const auto sign = KeeShareSettings::Sign{}; // invalid sign
|
||||||
auto trust = check(payload, reference, own.certificate, foreign.certificates, sign);
|
auto trust = check(payload, reference, own.certificate, foreign.certificates, sign);
|
||||||
switch(trust.first) {
|
switch(trust.first) {
|
||||||
case UntrustedForever:
|
case UntrustedForever:
|
||||||
|
@ -108,34 +108,34 @@ void TestSharing::testNullObjects()
|
|||||||
const QString empty;
|
const QString empty;
|
||||||
QXmlStreamReader reader(empty);
|
QXmlStreamReader reader(empty);
|
||||||
|
|
||||||
const KeeShareSettings::Key nullKey = {};
|
const auto nullKey = KeeShareSettings::Key{};
|
||||||
QVERIFY(nullKey.isNull());
|
QVERIFY(nullKey.isNull());
|
||||||
const KeeShareSettings::Key xmlKey = KeeShareSettings::Key::deserialize(reader);
|
const auto xmlKey = KeeShareSettings::Key::deserialize(reader);
|
||||||
QVERIFY(xmlKey.isNull());
|
QVERIFY(xmlKey.isNull());
|
||||||
|
|
||||||
const KeeShareSettings::Certificate certificate = {};
|
const auto certificate = KeeShareSettings::Certificate{};
|
||||||
QVERIFY(certificate.isNull());
|
QVERIFY(certificate.isNull());
|
||||||
const KeeShareSettings::Certificate xmlCertificate = KeeShareSettings::Certificate::deserialize(reader);
|
const auto xmlCertificate = KeeShareSettings::Certificate::deserialize(reader);
|
||||||
QVERIFY(xmlCertificate.isNull());
|
QVERIFY(xmlCertificate.isNull());
|
||||||
|
|
||||||
const KeeShareSettings::Own own = {};
|
const auto own = KeeShareSettings::Own{};
|
||||||
QVERIFY(own.isNull());
|
QVERIFY(own.isNull());
|
||||||
const KeeShareSettings::Own xmlOwn = KeeShareSettings::Own::deserialize(empty);
|
const auto xmlOwn = KeeShareSettings::Own::deserialize(empty);
|
||||||
QVERIFY(xmlOwn.isNull());
|
QVERIFY(xmlOwn.isNull());
|
||||||
|
|
||||||
const KeeShareSettings::Active active = {};
|
const auto active = KeeShareSettings::Active{};
|
||||||
QVERIFY(active.isNull());
|
QVERIFY(active.isNull());
|
||||||
const KeeShareSettings::Active xmlActive = KeeShareSettings::Active::deserialize(empty);
|
const auto xmlActive = KeeShareSettings::Active::deserialize(empty);
|
||||||
QVERIFY(xmlActive.isNull());
|
QVERIFY(xmlActive.isNull());
|
||||||
|
|
||||||
const KeeShareSettings::Foreign foreign = {};
|
const auto foreign = KeeShareSettings::Foreign{};
|
||||||
QVERIFY(foreign.certificates.isEmpty());
|
QVERIFY(foreign.certificates.isEmpty());
|
||||||
const KeeShareSettings::Foreign xmlForeign = KeeShareSettings::Foreign::deserialize(empty);
|
const auto xmlForeign = KeeShareSettings::Foreign::deserialize(empty);
|
||||||
QVERIFY(xmlForeign.certificates.isEmpty());
|
QVERIFY(xmlForeign.certificates.isEmpty());
|
||||||
|
|
||||||
const KeeShareSettings::Reference reference = {};
|
const auto reference = KeeShareSettings::Reference{};
|
||||||
QVERIFY(reference.isNull());
|
QVERIFY(reference.isNull());
|
||||||
const KeeShareSettings::Reference xmlReference = KeeShareSettings::Reference::deserialize(empty);
|
const auto xmlReference = KeeShareSettings::Reference::deserialize(empty);
|
||||||
QVERIFY(xmlReference.isNull());
|
QVERIFY(xmlReference.isNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user