Commit 9055df99 authored by Kenton Varda's avatar Kenton Varda

Fix GCC: Mark HANDLE_ERRORS error var as possibly-unused.

parent 3518cf05
...@@ -297,7 +297,7 @@ namespace kj { ...@@ -297,7 +297,7 @@ namespace kj {
#define KJ_SYSCALL_HANDLE_ERRORS(call) \ #define KJ_SYSCALL_HANDLE_ERRORS(call) \
if (int _kjSyscallError = ::kj::_::Debug::syscallError([&](){return (call);}, false)) \ if (int _kjSyscallError = ::kj::_::Debug::syscallError([&](){return (call);}, false)) \
switch (int error = _kjSyscallError) switch (int error KJ_UNUSED = _kjSyscallError)
// Like KJ_SYSCALL, but doesn't throw. Instead, the block after the macro is a switch block on the // Like KJ_SYSCALL, but doesn't throw. Instead, the block after the macro is a switch block on the
// error. Additionally, the int value `error` is defined within the block. So you can do: // error. Additionally, the int value `error` is defined within the block. So you can do:
// //
...@@ -318,7 +318,7 @@ namespace kj { ...@@ -318,7 +318,7 @@ namespace kj {
#define KJ_WIN32_HANDLE_ERRORS(call) \ #define KJ_WIN32_HANDLE_ERRORS(call) \
if (uint _kjWin32Error = ::kj::_::Debug::win32Call(call).number) \ if (uint _kjWin32Error = ::kj::_::Debug::win32Call(call).number) \
switch (uint error = _kjWin32Error) switch (uint error KJ_UNUSED = _kjWin32Error)
// Like KJ_WIN32, but doesn't throw. Instead, the block after the macro is a switch block on the // Like KJ_WIN32, but doesn't throw. Instead, the block after the macro is a switch block on the
// error. Additionally, the int value `error` is defined within the block. So you can do: // error. Additionally, the int value `error` is defined within the block. So you can do:
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment