Revert "core: Fix clang build"

This commit is contained in:
bunnei 2020-10-20 19:07:39 -07:00 committed by GitHub
parent fdd9154069
commit 3d592972dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 667 additions and 906 deletions

View file

@ -143,7 +143,6 @@ u64 GetSignatureTypeDataSize(SignatureType type) {
return 0x3C;
}
UNREACHABLE();
return 0;
}
u64 GetSignatureTypePaddingSize(SignatureType type) {
@ -158,7 +157,6 @@ u64 GetSignatureTypePaddingSize(SignatureType type) {
return 0x40;
}
UNREACHABLE();
return 0;
}
SignatureType Ticket::GetSignatureType() const {
@ -173,7 +171,6 @@ SignatureType Ticket::GetSignatureType() const {
}
UNREACHABLE();
return {};
}
TicketData& Ticket::GetData() {
@ -351,7 +348,7 @@ std::optional<Key128> DeriveSDSeed() {
std::array<u8, 0x10> buffer{};
std::size_t offset = 0;
for (; offset + 0x10 < save_43.GetSize(); ++offset) {
if (!save_43.Seek(static_cast<s64>(offset), SEEK_SET)) {
if (!save_43.Seek(offset, SEEK_SET)) {
return std::nullopt;
}
@ -361,7 +358,7 @@ std::optional<Key128> DeriveSDSeed() {
}
}
if (!save_43.Seek(static_cast<s64>(offset + 0x10), SEEK_SET)) {
if (!save_43.Seek(offset + 0x10, SEEK_SET)) {
return std::nullopt;
}

View file

@ -161,7 +161,7 @@ static constexpr u8 CalculateMaxKeyblobSourceHash() {
return true;
};
for (std::size_t i = 0x1F; i <= 0x1F; --i) {
for (s8 i = 0x1F; i >= 0; --i) {
if (!is_zero(keyblob_source_hashes[i])) {
return static_cast<u8>(i + 1);
}