diff options
author | Elliott Hughes <enh@google.com> | 2024-01-23 14:00:28 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2024-01-23 14:00:28 -0800 |
commit | f1d04bff5624f238c22d13e88c81295c5603969b (patch) | |
tree | 831f95b0a7211905708cc293b55420366f3651b6 | |
parent | 7a424df35cf8f23e0d39431f88bbaba8a7b1bd7b (diff) | |
download | libmemunreachable-f1d04bff5624f238c22d13e88c81295c5603969b.tar.gz |
Fix build warnings.
Test: treehugger
Change-Id: I855a6aaaa00c3020fb6b820ab11203854543a505
-rw-r--r-- | ScopedSignalHandler.h | 2 | ||||
-rw-r--r-- | tests/MemUnreachable_test.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ScopedSignalHandler.h b/ScopedSignalHandler.h index ef4473f..8cae4b6 100644 --- a/ScopedSignalHandler.h +++ b/ScopedSignalHandler.h @@ -50,7 +50,7 @@ class ScopedSignalHandler { } (*handler_map_)[signal] = - SignalFn([=](int signal, siginfo_t* si, void* uctx) { f(*this, signal, si, uctx); }); + SignalFn([=, this](int signal, siginfo_t* si, void* uctx) { f(*this, signal, si, uctx); }); struct sigaction act {}; act.sa_sigaction = [](int signal, siginfo_t* si, void* uctx) { diff --git a/tests/MemUnreachable_test.cpp b/tests/MemUnreachable_test.cpp index 8bc176b..4e2116b 100644 --- a/tests/MemUnreachable_test.cpp +++ b/tests/MemUnreachable_test.cpp @@ -49,7 +49,7 @@ class HiddenPointer { // Trick the compiler into thinking a value on the stack is still referenced. static void Ref(void** ptr) { - void** volatile storage; + void** volatile storage [[maybe_unused]]; storage = ptr; } |