Skip to content
Permalink
Browse files

Merge pull request #52 from alliedmodders/warnings

Prevent some warnings for SM builds
  • Loading branch information...
dvander committed Aug 1, 2018
2 parents 625c59d + d5030d0 commit 7efa054b82fc5f40ed751ec3f242144e7f16f581
Showing with 3 additions and 1 deletion.
  1. +3 −1 core/sourcehook/sh_memory.h
@@ -255,7 +255,7 @@ namespace SourceHook
*/
namespace
{
bool ModuleInMemory(char *addr, size_t len)
static inline bool ModuleInMemory(char *addr, size_t len)
{
#if SH_SYS == SH_SYS_LINUX
// On linux, first check /proc/self/maps
@@ -333,6 +333,7 @@ namespace SourceHook

for (size_t i = 0; i < len; i++)
dummy = p[i];
(void)dummy; // silence unused var, we must read from p

g_BadReadCalled = false;

@@ -359,6 +360,7 @@ namespace SourceHook

for (size_t i = 0; i < len; i++)
dummy = p[i];
(void)dummy; // silence unused var, we must read from p

g_BadReadCalled = false;

0 comments on commit 7efa054

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.