diff --git a/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp b/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp index a207b9d6..c760ba16 100644 --- a/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp +++ b/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp @@ -4,7 +4,6 @@ #include "../../Common/CommonUtils.h" #include "../../Common/MemoryCommon.h" -#include #include #include #include @@ -204,7 +203,6 @@ bool LinuxDolphinProcess::readFromRAM(const u32 offset, char* buffer, const size break; } default: - assert(0 && "Unexpected type size"); break; } } @@ -272,13 +270,13 @@ bool LinuxDolphinProcess::writeToRAM(const u32 offset, const char* buffer, const break; } default: - assert(0 && "Unexpected type size"); break; } } - delete[] bufferCopy; const ssize_t nwrote{process_vm_writev(m_PID, &local, 1, &remote, 1, 0)}; + delete[] bufferCopy; + if (nwrote == -1) { // A more specific error type should be available in `errno` (if ever interested). diff --git a/Source/DolphinProcess/Mac/MacDolphinProcess.cpp b/Source/DolphinProcess/Mac/MacDolphinProcess.cpp index 6dcbca81..f57824ca 100644 --- a/Source/DolphinProcess/Mac/MacDolphinProcess.cpp +++ b/Source/DolphinProcess/Mac/MacDolphinProcess.cpp @@ -4,7 +4,6 @@ #include "../../Common/CommonUtils.h" #include "../../Common/MemoryCommon.h" -#include #include #include #include @@ -171,7 +170,6 @@ bool MacDolphinProcess::readFromRAM(const u32 offset, char* buffer, size_t size, break; } default: - assert(0 && "Unexpected type size"); break; } } @@ -231,7 +229,6 @@ bool MacDolphinProcess::writeToRAM(const u32 offset, const char* buffer, const s break; } default: - assert(0 && "Unexpected type size"); break; } } diff --git a/Source/DolphinProcess/Windows/WindowsDolphinProcess.cpp b/Source/DolphinProcess/Windows/WindowsDolphinProcess.cpp index 0058b0e5..83bc521c 100644 --- a/Source/DolphinProcess/Windows/WindowsDolphinProcess.cpp +++ b/Source/DolphinProcess/Windows/WindowsDolphinProcess.cpp @@ -8,7 +8,6 @@ #ifdef UNICODE #include #endif -#include #include #include #include @@ -207,7 +206,6 @@ bool WindowsDolphinProcess::readFromRAM(const u32 offset, char* buffer, const si break; } default: - assert(0 && "Unexpected type size"); break; } } @@ -268,7 +266,6 @@ bool WindowsDolphinProcess::writeToRAM(const u32 offset, const char* buffer, con break; } default: - assert(0 && "Unexpected type size"); break; } } diff --git a/Source/MemoryScanner/MemoryScanner.h b/Source/MemoryScanner/MemoryScanner.h index d13872b7..c4c31d77 100644 --- a/Source/MemoryScanner/MemoryScanner.h +++ b/Source/MemoryScanner/MemoryScanner.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include