mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
Re-add dummy, cast to void
This commit is contained in:
parent
37738022ee
commit
d5030d0612
@ -329,8 +329,11 @@ namespace SourceHook
|
||||
prevHandler = signal(SIGSEGV, BadReadHandler);
|
||||
|
||||
volatile const char *p = reinterpret_cast<const char*>(addr);
|
||||
char dummy;
|
||||
|
||||
for (size_t i = 0; i < len; i++)
|
||||
p[i];
|
||||
dummy = p[i];
|
||||
(void)dummy; // silence unused var, we must read from p
|
||||
|
||||
g_BadReadCalled = false;
|
||||
|
||||
@ -353,8 +356,11 @@ namespace SourceHook
|
||||
return false;
|
||||
|
||||
volatile const char *p = reinterpret_cast<const char *>(addr);
|
||||
char dummy;
|
||||
|
||||
for (size_t i = 0; i < len; i++)
|
||||
p[i];
|
||||
dummy = p[i];
|
||||
(void)dummy; // silence unused var, we must read from p
|
||||
|
||||
g_BadReadCalled = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user