From 09b6c2ab5b54f1b0419ee4ad9e009a7ef584bfcd Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 21 Jul 2024 20:24:23 +0200 Subject: [PATCH] fix: Error log spamming when viewing invalid regions in process memory provider on linux --- .../content/providers/process_memory_provider.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/plugins/builtin/source/content/providers/process_memory_provider.cpp b/plugins/builtin/source/content/providers/process_memory_provider.cpp index d9475bf3c..6a7f5bfdf 100644 --- a/plugins/builtin/source/content/providers/process_memory_provider.cpp +++ b/plugins/builtin/source/content/providers/process_memory_provider.cpp @@ -81,10 +81,7 @@ namespace hex::plugin::builtin { }; auto read = process_vm_readv(m_processId, &local, 1, &remote, 1, 0); - - if (read == -1) { - log::error("Process memory provider failed to read data: {}", strerror(errno)); - } + hex::unused(read); #endif } void ProcessMemoryProvider::writeRaw(u64 address, const void *buffer, size_t size) { @@ -109,10 +106,8 @@ namespace hex::plugin::builtin { .iov_len = size, }; - auto read = process_vm_writev(m_processId, &local, 1, &remote, 1, 0); - if (read == -1) { - log::error("Process memory provider failed to write data: {}", strerror(errno)); - } + auto write = process_vm_writev(m_processId, &local, 1, &remote, 1, 0); + hex::unused(write); #endif }