mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-08 20:58:41 +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);
|
||||
Text("ROP3");
|
||||
TableSetColumnIndex(1);
|
||||
Text("%X", reg.rop3.Value());
|
||||
Text("%X", static_cast<u32>(reg.rop3.Value()));
|
||||
|
||||
if (begin_table) {
|
||||
EndTable();
|
||||
@@ -790,7 +790,7 @@ void ParseZInfo(u32 value, bool begin_table) {
|
||||
TableSetColumnIndex(0);
|
||||
Text("TILE_MODE_INDEX");
|
||||
TableSetColumnIndex(1);
|
||||
Text("%X", reg.tile_mode_index.Value());
|
||||
Text("%X", static_cast<u32>(reg.tile_mode_index.Value()));
|
||||
|
||||
TableNextRow();
|
||||
TableSetColumnIndex(0);
|
||||
|
||||
@@ -26,7 +26,7 @@ bool MemoryMapViewer::Iterator::DrawLine() {
|
||||
TableNextColumn();
|
||||
Text("%" PRIXPTR, m.base);
|
||||
TableNextColumn();
|
||||
Text("%llX", m.size);
|
||||
Text("%" PRIX64, m.size);
|
||||
TableNextColumn();
|
||||
Text("%s", magic_enum::enum_name(m.type).data());
|
||||
TableNextColumn();
|
||||
@@ -51,7 +51,7 @@ bool MemoryMapViewer::Iterator::DrawLine() {
|
||||
TableNextColumn();
|
||||
Text("%" PRIXPTR, m.base);
|
||||
TableNextColumn();
|
||||
Text("%llX", m.size);
|
||||
Text("%" PRIX64, m.size);
|
||||
TableNextColumn();
|
||||
auto type = static_cast<::Libraries::Kernel::MemoryTypes>(m.memory_type);
|
||||
Text("%s", magic_enum::enum_name(type).data());
|
||||
|
||||
@@ -118,4 +118,4 @@ _sceFiberSwitchEntry:
|
||||
# Fiber returned, not good
|
||||
movl $1, %edi
|
||||
call _sceFiberForceQuit
|
||||
ret
|
||||
ret
|
||||
|
||||
@@ -59,7 +59,7 @@ struct Mcontext {
|
||||
u64 mc_spare[6];
|
||||
};
|
||||
|
||||
struct Stack {
|
||||
struct ExStack {
|
||||
void* ss_sp;
|
||||
std::size_t ss_size;
|
||||
int ss_flags;
|
||||
@@ -75,7 +75,7 @@ struct Ucontext {
|
||||
int field1_0x10[12];
|
||||
struct Mcontext uc_mcontext;
|
||||
struct Ucontext* uc_link;
|
||||
struct Stack uc_stack;
|
||||
struct ExStack uc_stack;
|
||||
int uc_flags;
|
||||
int __spare[4];
|
||||
int field7_0x4f4[3];
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#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) {
|
||||
char buffer[n];
|
||||
int result = _vsnprintf(_out_buffer, buffer, format, arg);
|
||||
std::strcpy(s, buffer);
|
||||
std::vector<char> buffer(n);
|
||||
int result = _vsnprintf(_out_buffer, buffer.data(), format, arg);
|
||||
std::strcpy(s, buffer.data());
|
||||
return result;
|
||||
}
|
||||
|
||||
static int snprintf_ctx(char* s, size_t n, Common::VaCtx* ctx) {
|
||||
const char* format = vaArgPtr<const char>(&ctx->va_list);
|
||||
char buffer[n];
|
||||
int result = _vsnprintf(_out_buffer, buffer, format, &ctx->va_list);
|
||||
std::strcpy(s, buffer);
|
||||
std::vector<char> buffer(n);
|
||||
int result = _vsnprintf(_out_buffer, buffer.data(), format, &ctx->va_list);
|
||||
std::strcpy(s, buffer.data());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -904,7 +904,7 @@ const char* freebsd_inet_ntop6(const unsigned char* src, char* dst, u64 size) {
|
||||
tp += strlen(tp);
|
||||
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? */
|
||||
if (best.base != -1 && (best.base + best.len) == (NS_IN6ADDRSZ / NS_INT16SZ))
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "common/assert.h"
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
@@ -66,6 +67,8 @@ public:
|
||||
return "Tls";
|
||||
case SymbolType::NoType:
|
||||
return "NoType";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,12 @@ Tcb* GetTcbBase();
|
||||
void EnsureThreadInitialized();
|
||||
|
||||
template <size_t size>
|
||||
__attribute__((optnone)) void ClearStack() {
|
||||
#ifdef __clang__
|
||||
__attribute__((optnone))
|
||||
#else
|
||||
__attribute__((optimize("O0")))
|
||||
#endif
|
||||
void ClearStack() {
|
||||
volatile void* buf = alloca(size);
|
||||
memset(const_cast<void*>(buf), 0, size);
|
||||
buf = nullptr;
|
||||
|
||||
@@ -471,7 +471,7 @@ void RemoveTexture(ImTextureID texture) {
|
||||
IM_ASSERT(texture != nullptr);
|
||||
VkData* bd = GetBackendData();
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ constexpr std::string_view NameOf(Condition condition) {
|
||||
return "Execz";
|
||||
case Condition::Execnz:
|
||||
return "Execnz";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user