mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-09 21:31:04 +00:00
build: Fix a couple more warnings. (#3598)
This commit is contained in:
@@ -293,7 +293,7 @@ void ParseColorControl(u32 value, bool begin_table) {
|
|||||||
TableSetColumnIndex(0);
|
TableSetColumnIndex(0);
|
||||||
Text("ROP3");
|
Text("ROP3");
|
||||||
TableSetColumnIndex(1);
|
TableSetColumnIndex(1);
|
||||||
Text("%X", reg.rop3.Value());
|
Text("%X", static_cast<u32>(reg.rop3.Value()));
|
||||||
|
|
||||||
if (begin_table) {
|
if (begin_table) {
|
||||||
EndTable();
|
EndTable();
|
||||||
@@ -790,7 +790,7 @@ void ParseZInfo(u32 value, bool begin_table) {
|
|||||||
TableSetColumnIndex(0);
|
TableSetColumnIndex(0);
|
||||||
Text("TILE_MODE_INDEX");
|
Text("TILE_MODE_INDEX");
|
||||||
TableSetColumnIndex(1);
|
TableSetColumnIndex(1);
|
||||||
Text("%X", reg.tile_mode_index.Value());
|
Text("%X", static_cast<u32>(reg.tile_mode_index.Value()));
|
||||||
|
|
||||||
TableNextRow();
|
TableNextRow();
|
||||||
TableSetColumnIndex(0);
|
TableSetColumnIndex(0);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ bool MemoryMapViewer::Iterator::DrawLine() {
|
|||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
Text("%" PRIXPTR, m.base);
|
Text("%" PRIXPTR, m.base);
|
||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
Text("%llX", m.size);
|
Text("%" PRIX64, m.size);
|
||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
Text("%s", magic_enum::enum_name(m.type).data());
|
Text("%s", magic_enum::enum_name(m.type).data());
|
||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
@@ -51,7 +51,7 @@ bool MemoryMapViewer::Iterator::DrawLine() {
|
|||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
Text("%" PRIXPTR, m.base);
|
Text("%" PRIXPTR, m.base);
|
||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
Text("%llX", m.size);
|
Text("%" PRIX64, m.size);
|
||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
auto type = static_cast<::Libraries::Kernel::MemoryTypes>(m.memory_type);
|
auto type = static_cast<::Libraries::Kernel::MemoryTypes>(m.memory_type);
|
||||||
Text("%s", magic_enum::enum_name(type).data());
|
Text("%s", magic_enum::enum_name(type).data());
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ struct Mcontext {
|
|||||||
u64 mc_spare[6];
|
u64 mc_spare[6];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Stack {
|
struct ExStack {
|
||||||
void* ss_sp;
|
void* ss_sp;
|
||||||
std::size_t ss_size;
|
std::size_t ss_size;
|
||||||
int ss_flags;
|
int ss_flags;
|
||||||
@@ -75,7 +75,7 @@ struct Ucontext {
|
|||||||
int field1_0x10[12];
|
int field1_0x10[12];
|
||||||
struct Mcontext uc_mcontext;
|
struct Mcontext uc_mcontext;
|
||||||
struct Ucontext* uc_link;
|
struct Ucontext* uc_link;
|
||||||
struct Stack uc_stack;
|
struct ExStack uc_stack;
|
||||||
int uc_flags;
|
int uc_flags;
|
||||||
int __spare[4];
|
int __spare[4];
|
||||||
int field7_0x4f4[3];
|
int field7_0x4f4[3];
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common/va_ctx.h"
|
#include "common/va_ctx.h"
|
||||||
|
|
||||||
@@ -745,17 +746,17 @@ static int fprintf_ctx(Common::VaCtx* ctx, char* buf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int vsnprintf_ctx(char* s, size_t n, const char* format, Common::VaList* arg) {
|
static int vsnprintf_ctx(char* s, size_t n, const char* format, Common::VaList* arg) {
|
||||||
char buffer[n];
|
std::vector<char> buffer(n);
|
||||||
int result = _vsnprintf(_out_buffer, buffer, format, arg);
|
int result = _vsnprintf(_out_buffer, buffer.data(), format, arg);
|
||||||
std::strcpy(s, buffer);
|
std::strcpy(s, buffer.data());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snprintf_ctx(char* s, size_t n, Common::VaCtx* ctx) {
|
static int snprintf_ctx(char* s, size_t n, Common::VaCtx* ctx) {
|
||||||
const char* format = vaArgPtr<const char>(&ctx->va_list);
|
const char* format = vaArgPtr<const char>(&ctx->va_list);
|
||||||
char buffer[n];
|
std::vector<char> buffer(n);
|
||||||
int result = _vsnprintf(_out_buffer, buffer, format, &ctx->va_list);
|
int result = _vsnprintf(_out_buffer, buffer.data(), format, &ctx->va_list);
|
||||||
std::strcpy(s, buffer);
|
std::strcpy(s, buffer.data());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -904,7 +904,7 @@ const char* freebsd_inet_ntop6(const unsigned char* src, char* dst, u64 size) {
|
|||||||
tp += strlen(tp);
|
tp += strlen(tp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tp += sprintf(tp, "%x", words[i]);
|
tp += snprintf(tp, sizeof(tmp) - (tp - tmp), "%x", words[i]);
|
||||||
}
|
}
|
||||||
/* Was it a trailing run of 0x00's? */
|
/* Was it a trailing run of 0x00's? */
|
||||||
if (best.base != -1 && (best.base + best.len) == (NS_IN6ADDRSZ / NS_INT16SZ))
|
if (best.base != -1 && (best.base + best.len) == (NS_IN6ADDRSZ / NS_INT16SZ))
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <span>
|
#include <span>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "common/assert.h"
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
|
||||||
namespace Core::Loader {
|
namespace Core::Loader {
|
||||||
@@ -66,6 +67,8 @@ public:
|
|||||||
return "Tls";
|
return "Tls";
|
||||||
case SymbolType::NoType:
|
case SymbolType::NoType:
|
||||||
return "NoType";
|
return "NoType";
|
||||||
|
default:
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,12 @@ Tcb* GetTcbBase();
|
|||||||
void EnsureThreadInitialized();
|
void EnsureThreadInitialized();
|
||||||
|
|
||||||
template <size_t size>
|
template <size_t size>
|
||||||
__attribute__((optnone)) void ClearStack() {
|
#ifdef __clang__
|
||||||
|
__attribute__((optnone))
|
||||||
|
#else
|
||||||
|
__attribute__((optimize("O0")))
|
||||||
|
#endif
|
||||||
|
void ClearStack() {
|
||||||
volatile void* buf = alloca(size);
|
volatile void* buf = alloca(size);
|
||||||
memset(const_cast<void*>(buf), 0, size);
|
memset(const_cast<void*>(buf), 0, size);
|
||||||
buf = nullptr;
|
buf = nullptr;
|
||||||
|
|||||||
@@ -471,7 +471,7 @@ void RemoveTexture(ImTextureID texture) {
|
|||||||
IM_ASSERT(texture != nullptr);
|
IM_ASSERT(texture != nullptr);
|
||||||
VkData* bd = GetBackendData();
|
VkData* bd = GetBackendData();
|
||||||
const InitInfo& v = bd->init_info;
|
const InitInfo& v = bd->init_info;
|
||||||
v.device.freeDescriptorSets(bd->descriptor_pool, {texture->descriptor_set});
|
CheckVkErr(v.device.freeDescriptorSets(bd->descriptor_pool, {texture->descriptor_set}));
|
||||||
delete texture;
|
delete texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ constexpr std::string_view NameOf(Condition condition) {
|
|||||||
return "Execz";
|
return "Execz";
|
||||||
case Condition::Execnz:
|
case Condition::Execnz:
|
||||||
return "Execnz";
|
return "Execnz";
|
||||||
|
default:
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user