Skip to content

Commit 4c4d97d

Browse files
committed
Bug#33307573 unused variables warning on windows
Issue ===== clang on windows reports unused variables. Change ====== - ifdef variables properly. RB: 26947
1 parent 1c00524 commit 4c4d97d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

router/src/harness/src/loader.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ using namespace std::chrono_literals;
8686
static std::atomic<size_t> num_of_non_ready_services{0};
8787

8888
static const char kLogReopenServiceName[] = "log_reopen";
89+
#if defined(USE_POSIX_SIGNALS)
8990
static const char kSignalHandlerServiceName[] = "signal_handler";
91+
#endif
9092

9193
/**
9294
* @defgroup Loader Plugin loader

router/src/harness/tests/test_net_ts_impl_file.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
* @test closing an invalid file-descriptor should result in bad_file_desc.
3333
*/
3434
TEST(NetTS_impl_file, close_invalid_handle) {
35+
#if !defined(_WIN32)
36+
// TODO(jkneschk) investigate why windows returns 'true' in this case
37+
// according to the docs it shouldn't
38+
3539
const auto expected_ec =
3640
#ifdef _WIN32
3741
std::error_code(ERROR_INVALID_HANDLE, std::system_category())
@@ -40,9 +44,6 @@ TEST(NetTS_impl_file, close_invalid_handle) {
4044
#endif
4145
;
4246

43-
#if !defined(_WIN32)
44-
// TODO(jkneschk) investigate why windows returns 'true' in this case
45-
// according to the docs it shouldn't
4647
EXPECT_EQ(net::impl::file::close(net::impl::file::kInvalidHandle),
4748
stdx::make_unexpected(expected_ec));
4849
#endif

0 commit comments

Comments
 (0)