Fix warning about truncation

This commit is contained in:
Eladash 2019-12-07 08:19:28 +02:00 committed by Megamouse
commit 6a4ba9d562
3 changed files with 4 additions and 3 deletions

View file

@ -19,7 +19,8 @@ enum CellSslError : u32
CELL_SSL_ERROR_UNKNOWN_LOAD_CERT = 0x80740037 CELL_SSL_ERROR_UNKNOWN_LOAD_CERT = 0x80740037
}; };
enum // Certificate load flags // Certificate load flags
enum : u64
{ {
CELL_SSL_LOAD_CERT_SCE01 = 0x0000000000000001ULL, CELL_SSL_LOAD_CERT_SCE01 = 0x0000000000000001ULL,
CELL_SSL_LOAD_CERT_SCE02 = 0x0000000000000002ULL, CELL_SSL_LOAD_CERT_SCE02 = 0x0000000000000002ULL,

View file

@ -159,7 +159,7 @@ s32 sysutil_check_name_string(const char* src, s32 minlen, s32 maxlen)
return -1; return -1;
} }
for (u32 index = 0;; cur = src[++index]) for (s32 index = 0;; cur = src[++index])
{ {
if (cur == '\0' || index == maxlen) if (cur == '\0' || index == maxlen)
{ {

View file

@ -4787,7 +4787,7 @@ bool ppu_interpreter::MTFSFI(ppu_thread& ppu, ppu_opcode_t op)
{ {
std::array<u32, 16> values{}; std::array<u32, 16> values{};
for (size_t i = 0; i < values.size(); i++) for (u32 i = 0; i < values.size(); i++)
{ {
u32 value = 0, im = i; u32 value = 0, im = i;
value |= (im & 1) << (8 * 3); im >>= 1; value |= (im & 1) << (8 * 3); im >>= 1;