From 61f6eaad451652e779bb056786c1d6650d1fd7f5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 13 Nov 2019 06:50:49 -0500 Subject: common_funcs: silence sign-conversion warnings in MakeMagic() We can trivially resolve these by casting the characters to unsigned values and then shifting the bits. --- src/common/common_funcs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index c029dc7b3..6dc3e108f 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -56,7 +56,7 @@ std::string GetLastErrorMsg(); namespace Common { constexpr u32 MakeMagic(char a, char b, char c, char d) { - return a | b << 8 | c << 16 | d << 24; + return u32(a) | u32(b) << 8 | u32(c) << 16 | u32(d) << 24; } } // namespace Common -- cgit v1.2.3