mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Fix warnings in emucore
This commit is contained in:
parent
f2f3321952
commit
250736ece5
48 changed files with 189 additions and 193 deletions
|
|
@ -744,7 +744,7 @@ bool SCEDecrypter::DecryptData()
|
|||
// Calculate the total data size.
|
||||
for (unsigned int i = 0; i < meta_hdr.section_count; i++)
|
||||
{
|
||||
data_buf_length += meta_shdr[i].data_size;
|
||||
data_buf_length += ::narrow<u32>(meta_shdr[i].data_size, HERE);
|
||||
}
|
||||
|
||||
// Allocate a buffer to store decrypted data.
|
||||
|
|
@ -798,7 +798,7 @@ bool SCEDecrypter::DecryptData()
|
|||
}
|
||||
|
||||
// Advance the buffer's offset.
|
||||
data_buf_offset += meta_shdr[i].data_size;
|
||||
data_buf_offset += ::narrow<u32>(meta_shdr[i].data_size, HERE);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -828,7 +828,7 @@ std::vector<fs::file> SCEDecrypter::MakeFile()
|
|||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = meta_shdr[i].data_size;
|
||||
strm.avail_in = ::narrow<uInt>(meta_shdr[i].data_size, HERE);
|
||||
strm.avail_out = BUFSIZE;
|
||||
strm.next_in = data_buf.get()+data_buf_offset;
|
||||
strm.next_out = tempbuf;
|
||||
|
|
@ -873,7 +873,7 @@ std::vector<fs::file> SCEDecrypter::MakeFile()
|
|||
}
|
||||
|
||||
// Advance the data buffer offset by data size.
|
||||
data_buf_offset += meta_shdr[i].data_size;
|
||||
data_buf_offset += ::narrow<u32>(meta_shdr[i].data_size, HERE);
|
||||
|
||||
if (out_f.pos() != out_f.size())
|
||||
fmt::throw_exception("MakeELF written bytes (%llu) does not equal buffer size (%llu).", out_f.pos(), out_f.size());
|
||||
|
|
@ -1238,7 +1238,7 @@ bool SELFDecrypter::DecryptData()
|
|||
if (meta_shdr[i].encrypted == 3)
|
||||
{
|
||||
if ((meta_shdr[i].key_idx <= meta_hdr.key_count - 1) && (meta_shdr[i].iv_idx <= meta_hdr.key_count))
|
||||
data_buf_length += meta_shdr[i].data_size;
|
||||
data_buf_length += ::narrow<u32>(meta_shdr[i].data_size, HERE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1284,7 +1284,7 @@ bool SELFDecrypter::DecryptData()
|
|||
memcpy(data_buf.get() + data_buf_offset, buf.get(), meta_shdr[i].data_size);
|
||||
|
||||
// Advance the buffer's offset.
|
||||
data_buf_offset += meta_shdr[i].data_size;
|
||||
data_buf_offset += ::narrow<u32>(meta_shdr[i].data_size, HERE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue