Merge pull request #12394 from lioncash/compare

General: Resolve -Wsign-compare warnings
This commit is contained in:
Admiral H. Curtiss
2023-12-12 03:43:12 +01:00
committed by GitHub
6 changed files with 9 additions and 8 deletions

View File

@ -373,7 +373,7 @@ void TraversalClient::HandleTraversalTest()
waitCondition = 0;
break;
}
else if (rv < sizeof(packet) || raddr.host != m_ServerAddress.host ||
else if (rv < int(sizeof(packet)) || raddr.host != m_ServerAddress.host ||
raddr.host != m_portAlt || packet.requestId != m_TestRequestId)
{
// irrelevant packet, ignore

View File

@ -248,7 +248,7 @@ void Arm64GPRCache::FlushRegisters(BitSet32 regs, bool maintain_state, ARM64Reg
ASSERT_MSG(DYNA_REC, m_guest_registers[GUEST_GPR_OFFSET + i].GetType() != RegType::Discarded,
"Attempted to flush discarded register");
if (i + 1 < GUEST_GPR_COUNT && regs[i + 1])
if (i + 1 < int(GUEST_GPR_COUNT) && regs[i + 1])
{
// We've got two guest registers in a row to store
OpArg& reg1 = m_guest_registers[GUEST_GPR_OFFSET + i];

View File

@ -236,9 +236,9 @@ void JitArm64::twx(UGeckoInstruction inst)
constexpr std::array<CCFlags, 5> conditions{{CC_LT, CC_GT, CC_EQ, CC_VC, CC_VS}};
Common::SmallVector<FixupBranch, conditions.size()> fixups;
for (int i = 0; i < conditions.size(); i++)
for (size_t i = 0; i < conditions.size(); i++)
{
if (inst.TO & (1 << i))
if (inst.TO & (1U << i))
{
FixupBranch f = B(conditions[i]);
fixups.push_back(f);

View File

@ -598,7 +598,7 @@ void VertexManagerBase::Flush()
std::optional<CustomPixelShader> custom_pixel_shader;
std::vector<std::string> custom_pixel_texture_names;
std::span<u8> custom_pixel_shader_uniforms;
for (int i = 0; i < texture_names.size(); i++)
for (size_t i = 0; i < texture_names.size(); i++)
{
const std::string& texture_name = texture_names[i];
const u32 texture_unit = texture_units[i];