diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-05 08:18:16 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-05 08:18:16 +0100 |
commit | 4f13e270c8c63f86a135426e381eef7d4837e5a4 (patch) | |
tree | a6c9a29f9bf481c353ab9c5349e82d6c9d7dc5be /src/core | |
parent | Merge pull request #5292 from ReinUsesLisp/empty-set (diff) | |
download | yuzu-4f13e270c8c63f86a135426e381eef7d4837e5a4.tar yuzu-4f13e270c8c63f86a135426e381eef7d4837e5a4.tar.gz yuzu-4f13e270c8c63f86a135426e381eef7d4837e5a4.tar.bz2 yuzu-4f13e270c8c63f86a135426e381eef7d4837e5a4.tar.lz yuzu-4f13e270c8c63f86a135426e381eef7d4837e5a4.tar.xz yuzu-4f13e270c8c63f86a135426e381eef7d4837e5a4.tar.zst yuzu-4f13e270c8c63f86a135426e381eef7d4837e5a4.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/crypto/key_manager.cpp | 11 | ||||
-rw-r--r-- | src/core/file_sys/nca_patch.cpp | 2 | ||||
-rw-r--r-- | src/core/file_sys/registered_cache.cpp | 3 | ||||
-rw-r--r-- | src/core/hle/kernel/memory/address_space_info.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/sockets/sockets_translate.cpp | 1 |
5 files changed, 11 insertions, 8 deletions
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index da15f764a..cebe2ce37 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp @@ -143,6 +143,7 @@ u64 GetSignatureTypeDataSize(SignatureType type) { return 0x3C; } UNREACHABLE(); + return 0; } u64 GetSignatureTypePaddingSize(SignatureType type) { @@ -157,6 +158,7 @@ u64 GetSignatureTypePaddingSize(SignatureType type) { return 0x40; } UNREACHABLE(); + return 0; } SignatureType Ticket::GetSignatureType() const { @@ -169,8 +171,7 @@ SignatureType Ticket::GetSignatureType() const { if (const auto* ticket = std::get_if<ECDSATicket>(&data)) { return ticket->sig_type; } - - UNREACHABLE(); + throw std::bad_variant_access{}; } TicketData& Ticket::GetData() { @@ -183,8 +184,7 @@ TicketData& Ticket::GetData() { if (auto* ticket = std::get_if<ECDSATicket>(&data)) { return ticket->data; } - - UNREACHABLE(); + throw std::bad_variant_access{}; } const TicketData& Ticket::GetData() const { @@ -197,8 +197,7 @@ const TicketData& Ticket::GetData() const { if (const auto* ticket = std::get_if<ECDSATicket>(&data)) { return ticket->data; } - - UNREACHABLE(); + throw std::bad_variant_access{}; } u64 Ticket::GetSize() const { diff --git a/src/core/file_sys/nca_patch.cpp b/src/core/file_sys/nca_patch.cpp index adcf0732f..a65ec6798 100644 --- a/src/core/file_sys/nca_patch.cpp +++ b/src/core/file_sys/nca_patch.cpp @@ -51,8 +51,8 @@ std::pair<std::size_t, std::size_t> SearchBucketEntry(u64 offset, const BlockTyp low = mid + 1; } } - UNREACHABLE_MSG("Offset could not be found in BKTR block."); + return {0, 0}; } } // Anonymous namespace diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index da01002d5..431302f55 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -105,7 +105,8 @@ ContentRecordType GetCRTypeFromNCAType(NCAContentType type) { // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal. return ContentRecordType::HtmlDocument; default: - UNREACHABLE_MSG("Invalid NCAContentType={:02X}", static_cast<u8>(type)); + UNREACHABLE_MSG("Invalid NCAContentType={:02X}", type); + return ContentRecordType{}; } } diff --git a/src/core/hle/kernel/memory/address_space_info.cpp b/src/core/hle/kernel/memory/address_space_info.cpp index e4288cab4..6cf43ba24 100644 --- a/src/core/hle/kernel/memory/address_space_info.cpp +++ b/src/core/hle/kernel/memory/address_space_info.cpp @@ -96,6 +96,7 @@ u64 AddressSpaceInfo::GetAddressSpaceStart(std::size_t width, Type type) { return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].address; } UNREACHABLE(); + return 0; } std::size_t AddressSpaceInfo::GetAddressSpaceSize(std::size_t width, Type type) { @@ -112,6 +113,7 @@ std::size_t AddressSpaceInfo::GetAddressSpaceSize(std::size_t width, Type type) return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].size; } UNREACHABLE(); + return 0; } } // namespace Kernel::Memory diff --git a/src/core/hle/service/sockets/sockets_translate.cpp b/src/core/hle/service/sockets/sockets_translate.cpp index c822d21b8..ca61d72ca 100644 --- a/src/core/hle/service/sockets/sockets_translate.cpp +++ b/src/core/hle/service/sockets/sockets_translate.cpp @@ -64,6 +64,7 @@ Network::Type Translate(Type type) { return Network::Type::DGRAM; default: UNIMPLEMENTED_MSG("Unimplemented type={}", type); + return Network::Type{}; } } |