Fix a bunch of compiler warnings

This commit is contained in:
Connor McLaughlin
2020-07-09 13:29:58 +10:00
parent 60a739e305
commit a5fe740e30
11 changed files with 15 additions and 19 deletions

View File

@ -839,7 +839,7 @@ void GPU_HW_OpenGL::UpdateVRAM(u32 x, u32 y, u32 width, u32 height, const void*
// update texture data
glTexSubImage2D(GL_TEXTURE_2D, 0, x, flipped_y, width, height, GL_RGBA, GL_UNSIGNED_BYTE,
reinterpret_cast<void*>(map_result.buffer_offset));
reinterpret_cast<void*>(static_cast<uintptr_t>(map_result.buffer_offset)));
m_texture_stream_buffer->Unbind();
if (m_resolution_scale > 1)

View File

@ -411,9 +411,10 @@ void Core::MulMatVecBuggy(const s16 M[3][3], const s32 T[3], const s16 Vx, const
#define dot3(i) \
do \
{ \
TruncateAndSetIR<i + 1>( \
SignExtendMACResult<i + 1>(SignExtendMACResult<i + 1>((s64(T[i]) << 12) + (s64(M[i][0]) * s64(Vx)))) >> shift, \
false); \
TruncateAndSetIR<i + 1>(static_cast<s32>(SignExtendMACResult<i + 1>(SignExtendMACResult<i + 1>( \
(s64(T[i]) << 12) + (s64(M[i][0]) * s64(Vx)))) >> \
shift), \
false); \
TruncateAndSetMACAndIR<i + 1>(SignExtendMACResult<i + 1>((s64(M[i][1]) * s64(Vy))) + (s64(M[i][2]) * s64(Vz)), \
shift, lm); \
} while (0)

View File

@ -1,6 +1,5 @@
#include "namco_guncon.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "gpu.h"
#include "host_display.h"
@ -8,7 +7,6 @@
#include "resources.h"
#include "system.h"
#include <array>
Log_SetChannel(NamcoGunCon);
NamcoGunCon::NamcoGunCon(System* system) : m_system(system) {}

View File

@ -1477,7 +1477,6 @@ std::tuple<s32, s32> SPU::SampleVoice(u32 voice_index)
if (IsPitchModulationEnabled(voice_index))
{
const s32 factor = std::clamp<s32>(m_voices[voice_index - 1].last_volume, -0x8000, 0x7FFF) + 0x8000;
const u16 old_step = step;
step = Truncate16(static_cast<u32>((SignExtend32(step) * factor) >> 15));
}
step = std::min<u16>(step, 0x3FFF);

View File

@ -867,9 +867,9 @@ void System::UpdateMemoryCards()
{
m_pad->SetMemoryCard(i, nullptr);
const MemoryCardType type = settings.memory_card_types[i];
std::unique_ptr<MemoryCard> card;
switch (settings.memory_card_types[i])
const MemoryCardType type = settings.memory_card_types[i];
switch (type)
{
case MemoryCardType::None:
continue;