From 67ba326ff6e9db7227ee9992501e1e319a0652c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 2 Dec 2017 21:48:01 +0100 Subject: [PATCH 1/2] VideoCommon: Fix -Wformat warnings --- Source/Core/VideoCommon/BPStructs.cpp | 2 +- Source/Core/VideoCommon/HiresTextures.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 5bf53832c3..108a478035 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -1017,7 +1017,7 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc) (copy.clamp0 && copy.clamp1) ? "Top and Bottom" : (copy.clamp0) ? "Top only" : (copy.clamp1) ? "Bottom only" : "None", - no_yes[copy.yuv], copy.tp_realFormat(), + no_yes[copy.yuv], static_cast(copy.tp_realFormat()), (copy.gamma == 0) ? "1.0" : (copy.gamma == 1) ? "1.7" : (copy.gamma == 2) ? "2.2" : "Invalid value 0x3?", diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index 60b7630512..f5294d275a 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -284,7 +284,7 @@ std::string HiresTexture::GenBaseName(const u8* texture, size_t texture_size, co std::string basename = s_format_prefix + StringFromFormat("%dx%d%s_%016" PRIx64, width, height, has_mipmaps ? "_m" : "", tex_hash); std::string tlutname = tlut_size ? StringFromFormat("_%016" PRIx64, tlut_hash) : ""; - std::string formatname = StringFromFormat("_%d", format); + std::string formatname = StringFromFormat("_%d", static_cast(format)); std::string fullname = basename + tlutname + formatname; for (int level = 0; level < 10 && convert; level++) From d95177526fc46d953bc7febca80a6874e67ab2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 2 Dec 2017 21:52:07 +0100 Subject: [PATCH 2/2] VideoBackends: Fix -Wswitch warnings --- Source/Core/VideoBackends/Software/TextureEncoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/VideoBackends/Software/TextureEncoder.cpp b/Source/Core/VideoBackends/Software/TextureEncoder.cpp index 4d0997ebf5..c6f9f1b504 100644 --- a/Source/Core/VideoBackends/Software/TextureEncoder.cpp +++ b/Source/Core/VideoBackends/Software/TextureEncoder.cpp @@ -1441,6 +1441,8 @@ void EncodeEfbCopy(u8* dst, const EFBCopyParams& params, u32 native_width, u32 b case PEControl::Z24: EncodeZ24halfscale(dst, src, params.copy_format); break; + default: + break; } } else @@ -1459,6 +1461,8 @@ void EncodeEfbCopy(u8* dst, const EFBCopyParams& params, u32 native_width, u32 b case PEControl::Z24: EncodeZ24(dst, src, params.copy_format); break; + default: + break; } } }