diff options
author | yz70s <yz70s@users.noreply.github.com> | 2019-12-16 22:51:02 +0100 |
---|---|---|
committer | yz70s <yz70s@users.noreply.github.com> | 2019-12-16 23:00:43 +0100 |
commit | 8b908f306b46576c40953a83bd87e994edc3e97a (patch) | |
tree | b2af82e9382eba4cfb66e6020c4df2907cfed5d2 | |
parent | 3026c35a2344de4bfe1f33f5b17c597c658e3ba8 (diff) |
Remove some cases of visual studio warnings 4805 4389 4065 (nw)
-rw-r--r-- | src/devices/cpu/i386/cpuidmsrs.hxx | 20 | ||||
-rw-r--r-- | src/mame/video/xbox_nv2a.cpp | 20 |
2 files changed, 16 insertions, 24 deletions
diff --git a/src/devices/cpu/i386/cpuidmsrs.hxx b/src/devices/cpu/i386/cpuidmsrs.hxx index dcbc8faff37..63c233f6776 100644 --- a/src/devices/cpu/i386/cpuidmsrs.hxx +++ b/src/devices/cpu/i386/cpuidmsrs.hxx @@ -158,23 +158,13 @@ void pentium_pro_device::opcode_wrmsr(uint64_t data, bool &valid_msr) uint64_t pentium4_device::opcode_rdmsr(bool &valid_msr) { - switch (REG32(ECX)) - { - default: - logerror("RDMSR: unimplemented register called %08x at %08x\n", REG32(ECX), m_pc - 2); - valid_msr = true; - return 0; - } - return -1; + logerror("RDMSR: unimplemented register called %08x at %08x\n", REG32(ECX), m_pc - 2); + valid_msr = true; + return 0; } void pentium4_device::opcode_wrmsr(uint64_t data, bool &valid_msr) { - switch (REG32(ECX)) - { - default: - logerror("WRMSR: unimplemented register called %08x (%08x%08x) at %08x\n", REG32(ECX), (uint32_t)(data >> 32), (uint32_t)data, m_pc - 2); - valid_msr = true; - break; - } + logerror("WRMSR: unimplemented register called %08x (%08x%08x) at %08x\n", REG32(ECX), (uint32_t)(data >> 32), (uint32_t)data, m_pc - 2); + valid_msr = true; } diff --git a/src/mame/video/xbox_nv2a.cpp b/src/mame/video/xbox_nv2a.cpp index 31f9411c743..6bff22f9493 100644 --- a/src/mame/video/xbox_nv2a.cpp +++ b/src/mame/video/xbox_nv2a.cpp @@ -1331,11 +1331,13 @@ void nv2a_renderer::write_pixel(int x, int y, uint32_t color, int depth) uint32_t deptsten; int32_t c[4], fb[4], s[4], d[4], cc[4]; uint32_t dep, sten, stenc, stenv; + uint32_t udepth; bool stencil_passed; bool depth_passed; if ((depth > 0xffffff) || (depth < 0) || (x < 0)) return; + udepth = (uint32_t)depth; fb[3] = fb[2] = fb[1] = fb[0] = 0; addr = nullptr; if (color_mask != 0) @@ -1508,27 +1510,27 @@ void nv2a_renderer::write_pixel(int x, int y, uint32_t color, int depth) depth_passed = false; break; case NV2A_COMPARISON_OP::LESS: - if (depth >= dep) + if (udepth >= dep) depth_passed = false; break; case NV2A_COMPARISON_OP::EQUAL: - if (depth != dep) + if (udepth != dep) depth_passed = false; break; case NV2A_COMPARISON_OP::LEQUAL: - if (depth > dep) + if (udepth > dep) depth_passed = false; break; case NV2A_COMPARISON_OP::GREATER: - if (depth <= dep) + if (udepth <= dep) depth_passed = false; break; case NV2A_COMPARISON_OP::NOTEQUAL: - if (depth == dep) + if (udepth == dep) depth_passed = false; break; case NV2A_COMPARISON_OP::GEQUAL: - if (depth < dep) + if (udepth < dep) depth_passed = false; break; case NV2A_COMPARISON_OP::ALWAYS: @@ -1925,7 +1927,7 @@ void nv2a_renderer::write_pixel(int x, int y, uint32_t color, int depth) } } if (depth_write_enabled) - dep = depth; + dep = udepth; if (depthformat_rendertarget == NV2A_RT_DEPTH_FORMAT::Z24S8) { deptsten = (dep << 8) | sten; *daddr32 = deptsten; @@ -4491,11 +4493,11 @@ WRITE_LINE_MEMBER(nv2a_renderer::vblank_callback) #ifdef LOG_NV2A printf("vblank_callback\n\r"); #endif - if ((state == true) && (puller_waiting == 1)) { + if ((state != 0) && (puller_waiting == 1)) { puller_waiting = 0; puller_timer_work(nullptr, 0); } - if (state == true) { + if (state != 0) { pcrtc[0x100 / 4] |= 1; pcrtc[0x808 / 4] |= 0x10000; } |