mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-21 14:54:14 +01:00
Re-add dummy, cast to void
This commit is contained in:
parent
96695e209e
commit
2418a49e7d
@ -322,8 +322,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;
|
||||
|
||||
@ -344,8 +347,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