From 65f19b51c43fbc35a1f1bfb81d773eaf6b5fffd3 Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 19 Aug 2017 12:04:40 -0500 Subject: Warnings: Add UNREACHABLE macros to switches that contemplate all possible values. --- src/core/file_sys/archive_backend.cpp | 2 ++ src/core/hle/kernel/kernel.h | 3 +++ src/core/hw/gpu.h | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/file_sys/archive_backend.cpp b/src/core/file_sys/archive_backend.cpp index 1fae0ede0..87a240d7a 100644 --- a/src/core/file_sys/archive_backend.cpp +++ b/src/core/file_sys/archive_backend.cpp @@ -90,6 +90,8 @@ std::u16string Path::AsU16Str() const { LOG_ERROR(Service_FS, "LowPathType cannot be converted to u16string!"); return {}; } + + UNREACHABLE(); } std::vector Path::AsBinary() const { diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 9cf288b08..142bb84b2 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -8,6 +8,7 @@ #include #include #include +#include "common/assert.h" #include "common/common_types.h" namespace Kernel { @@ -84,6 +85,8 @@ public: case HandleType::ClientSession: return false; } + + UNREACHABLE(); } public: diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h index 21b127fee..e3d0a0e08 100644 --- a/src/core/hw/gpu.h +++ b/src/core/hw/gpu.h @@ -74,9 +74,9 @@ struct Regs { case PixelFormat::RGB5A1: case PixelFormat::RGBA4: return 2; - default: - UNIMPLEMENTED(); } + + UNREACHABLE(); } INSERT_PADDING_WORDS(0x4); -- cgit v1.2.3