fix some warnings
This commit is contained in:
@@ -400,7 +400,7 @@ u64 memory_viewer_panel::OnSearch(std::string wstr, u32 mode)
|
|||||||
{
|
{
|
||||||
while (first_char = section.find_first_of(insensitive_search, first_char), first_char != umax)
|
while (first_char = section.find_first_of(insensitive_search, first_char), first_char != umax)
|
||||||
{
|
{
|
||||||
const u32 start = addr + first_char;
|
const u32 start = addr + ::narrow<u32>(first_char);
|
||||||
|
|
||||||
std::string_view test_sv{get_ptr(start), addr_max - start};
|
std::string_view test_sv{get_ptr(start), addr_max - start};
|
||||||
|
|
||||||
@@ -420,7 +420,7 @@ u64 memory_viewer_panel::OnSearch(std::string wstr, u32 mode)
|
|||||||
{
|
{
|
||||||
while (first_char = section.find_first_of(wstr[0], first_char), first_char != umax)
|
while (first_char = section.find_first_of(wstr[0], first_char), first_char != umax)
|
||||||
{
|
{
|
||||||
const u32 start = addr + first_char;
|
const u32 start = addr + ::narrow<u32>(first_char);
|
||||||
|
|
||||||
std::string_view test_sv{get_ptr(start), addr_max - start};
|
std::string_view test_sv{get_ptr(start), addr_max - start};
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ std::string derive_password(std::string_view user_password)
|
|||||||
std::string_view salt_str = "No matter where you go, everybody's connected.";
|
std::string_view salt_str = "No matter where you go, everybody's connected.";
|
||||||
|
|
||||||
u8 derived_password_digest[SHA3_256_DIGEST_LENGTH];
|
u8 derived_password_digest[SHA3_256_DIGEST_LENGTH];
|
||||||
ensure(!wc_PBKDF2(derived_password_digest, reinterpret_cast<const u8*>(user_password.data()), user_password.size(), reinterpret_cast<const u8*>(salt_str.data()), salt_str.size(), 200'000, SHA3_256_DIGEST_LENGTH, WC_SHA3_256));
|
ensure(!wc_PBKDF2(derived_password_digest, reinterpret_cast<const u8*>(user_password.data()), ::narrow<s32>(user_password.size()), reinterpret_cast<const u8*>(salt_str.data()), ::narrow<s32>(salt_str.size()), 200'000, SHA3_256_DIGEST_LENGTH, WC_SHA3_256));
|
||||||
|
|
||||||
std::string derived_password("0000000000000000000000000000000000000000000000000000000000000000");
|
std::string derived_password("0000000000000000000000000000000000000000000000000000000000000000");
|
||||||
for (u32 i = 0; i < SHA3_256_DIGEST_LENGTH; i++)
|
for (u32 i = 0; i < SHA3_256_DIGEST_LENGTH; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user