From b9b150e638c9b6d468b4181547c42dc53092cdbf Mon Sep 17 00:00:00 2001 From: Headline Date: Sun, 29 Jul 2018 04:09:18 -0700 Subject: [PATCH] Fix warnings for SM builds --- core/sourcehook/sh_memory.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/sourcehook/sh_memory.h b/core/sourcehook/sh_memory.h index 7f16fba..3aed943 100644 --- a/core/sourcehook/sh_memory.h +++ b/core/sourcehook/sh_memory.h @@ -255,7 +255,7 @@ namespace SourceHook */ namespace { - bool ModuleInMemory(char *addr, size_t len) + inline bool ModuleInMemory(char *addr, size_t len) { #if SH_SYS == SH_SYS_LINUX // On linux, first check /proc/self/maps @@ -328,12 +328,6 @@ namespace SourceHook prevHandler = signal(SIGSEGV, BadReadHandler); - volatile const char *p = reinterpret_cast(addr); - char dummy; - - for (size_t i = 0; i < len; i++) - dummy = p[i]; - g_BadReadCalled = false; signal(SIGSEGV, prevHandler);