Skip to content

Commit 8c025a9

Browse files
committed
use [[maybe_unused]] instead of #ifdef
1 parent e2b8a58 commit 8c025a9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • barretenberg/cpp/src/barretenberg/numeric/random

barretenberg/cpp/src/barretenberg/numeric/random/engine.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,10 @@ template <size_t size_in_unsigned_ints> std::array<unsigned int, size_in_unsigne
8484
}
8585
size_t bytes_left = RANDOM_BUFFER_SIZE;
8686
uint8_t* current_offset = random_buffer_wrapper.buffer.get();
87-
#if !defined(_WIN32)
8887
// Bound EINTR retries so a pathological signal storm cannot mask a genuine fault.
89-
constexpr int MAX_EINTR_RETRIES = 16;
90-
int eintr_retries = 0;
91-
#endif
88+
// Unused on Windows (BCryptGenRandom is not interruptible).
89+
[[maybe_unused]] constexpr int MAX_EINTR_RETRIES = 16;
90+
[[maybe_unused]] int eintr_retries = 0;
9291
// Sample until we fill the buffer
9392
while (bytes_left != 0) {
9493
#if defined(__wasm__) || defined(__APPLE__)

0 commit comments

Comments
 (0)