From f927af20f2d62286a7d077cc6ef4e345819ecafc Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Thu, 7 Aug 2014 03:24:42 +0200 Subject: [PATCH] Fix more warnings from #579 --- Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp | 2 +- Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp | 2 +- Source/Core/DolphinWX/MainAndroid.cpp | 2 -- Source/Core/DolphinWX/MainNoGUI.cpp | 12 +++++------- Source/DSPTool/DSPTool.cpp | 6 +++--- Source/UnitTests/Common/BitFieldTest.cpp | 2 +- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp b/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp index 080476a3ec..a8f8e06ad2 100644 --- a/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp +++ b/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp @@ -1011,7 +1011,7 @@ void DSPJitRegCache::spillXReg(X64Reg reg) if (xregs[reg].guest_reg <= DSP_REG_MAX_MEM_BACKED) { _assert_msg_(DSPLLE, !regs[xregs[reg].guest_reg].used, - "to be spilled host reg %x(guest reg %x) still in use!", + "to be spilled host reg %x(guest reg %zx) still in use!", reg, xregs[reg].guest_reg); movToMemory(xregs[reg].guest_reg); diff --git a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp index 584aaba32c..0ff84352f2 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp @@ -1666,7 +1666,7 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, u32 exitAddress) { u64 val = ibuild->GetImmValue64(I); if ((u32)val == val) Jit->MOV(32, R(reg), Imm32(val)); - else if ((s32)val == val) + else if ((s32)val == (s64)val) Jit->MOV(64, R(reg), Imm32(val)); else Jit->MOV(64, R(reg), Imm64(val)); diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index b8f05b4684..4f0d8a5c10 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -110,8 +110,6 @@ bool Host_RendererHasFocus() void Host_ConnectWiimote(int wm_idx, bool connect) {} -void Host_SetWaitCursor(bool enable){} - void Host_UpdateStatusBar(const std::string& text, int filed){} void Host_SysMessage(const char *fmt, ...) diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 6deebab93b..e8211a993f 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -41,15 +41,15 @@ #import #endif -bool rendererHasFocus = true; -bool running = true; +static bool rendererHasFocus = true; +static bool running = true; void Host_NotifyMapLoaded() {} void Host_RefreshDSPDebuggerWindow() {} void Host_ShowJitResults(unsigned int address){} -Common::Event updateMainFrameEvent; +static Common::Event updateMainFrameEvent; void Host_Message(int Id) { switch (Id) @@ -109,8 +109,6 @@ bool Host_RendererHasFocus() void Host_ConnectWiimote(int wm_idx, bool connect) {} -void Host_SetWaitCursor(bool enable){} - void Host_UpdateStatusBar(const std::string& text, int filed){} void Host_SysMessage(const char *fmt, ...) @@ -137,7 +135,7 @@ void Host_SetWiiMoteConnectionState(int _State) {} void Host_ShowVideoConfig(void*, const std::string&, const std::string&) {} #if HAVE_X11 -void X11_MainLoop() +static void X11_MainLoop() { bool fullscreen = SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen; while (!Core::IsRunning()) @@ -271,7 +269,7 @@ void X11_MainLoop() #endif #if HAVE_WAYLAND -void Wayland_MainLoop() +static void Wayland_MainLoop() { // Wait for display to be initialized while (!GLWin.wl_display) diff --git a/Source/DSPTool/DSPTool.cpp b/Source/DSPTool/DSPTool.cpp index da3b2e1a8f..ba7fd1ea8d 100644 --- a/Source/DSPTool/DSPTool.cpp +++ b/Source/DSPTool/DSPTool.cpp @@ -21,7 +21,7 @@ void DSPHost::UpdateDebugger() {} // This test goes from text ASM to binary to text ASM and once again back to binary. // Then the two binaries are compared. -bool RoundTrip(const std::vector &code1) +static bool RoundTrip(const std::vector &code1) { std::vector code2; std::string text; @@ -45,7 +45,7 @@ bool RoundTrip(const std::vector &code1) // This test goes from text ASM to binary to text ASM and once again back to binary. // Very convenient for testing. Then the two binaries are compared. -bool SuperTrip(const char *asm_code) +static bool SuperTrip(const char *asm_code) { std::vector code1, code2; std::string text; @@ -80,7 +80,7 @@ bool SuperTrip(const char *asm_code) return true; } -void RunAsmTests() +static void RunAsmTests() { bool fail = false; #define CHK(a) if (!SuperTrip(a)) printf("FAIL\n%s\n", a), fail = true; diff --git a/Source/UnitTests/Common/BitFieldTest.cpp b/Source/UnitTests/Common/BitFieldTest.cpp index a97fd3bb82..aa98352272 100644 --- a/Source/UnitTests/Common/BitFieldTest.cpp +++ b/Source/UnitTests/Common/BitFieldTest.cpp @@ -24,7 +24,7 @@ union TestUnion }; // table of raw numbers to test with -u64 table[] = +static u64 table[] = { 0x0000000000000000ull, // all zero 0xffffffffffffffffull, // all one