diff options
author | David Robillard <d@drobilla.net> | 2023-02-04 19:25:22 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-02-04 19:25:22 -0500 |
commit | 5a9787b4247c6735cc3213944945e8983002edf9 (patch) | |
tree | 635a8711a53b9e50d7dcd24dc4acefefce694c3d /test/test_ring.c | |
parent | c4b3814edad510c6c124089822bd5506f9334411 (diff) | |
download | zix-5a9787b4247c6735cc3213944945e8983002edf9.tar.gz zix-5a9787b4247c6735cc3213944945e8983002edf9.tar.bz2 zix-5a9787b4247c6735cc3213944945e8983002edf9.zip |
Suppress/fix clang-tidy warnings on Windows
Diffstat (limited to 'test/test_ring.c')
-rw-r--r-- | test/test_ring.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_ring.c b/test/test_ring.c index fc3d982..644f333 100644 --- a/test/test_ring.c +++ b/test/test_ring.c @@ -102,11 +102,13 @@ test_ring(const unsigned size) const ZixStatus st = zix_ring_mlock(ring); assert(!st || st == ZIX_STATUS_NOT_SUPPORTED); - ZixThread reader_thread; // NOLINT - assert(!zix_thread_create(&reader_thread, MSG_SIZE * 4UL, reader, NULL)); + static const size_t stack_size = (size_t)MSG_SIZE * 4U; - ZixThread writer_thread; // NOLINT - assert(!zix_thread_create(&writer_thread, MSG_SIZE * 4UL, writer, NULL)); + ZixThread reader_thread; // NOLINT(cppcoreguidelines-init-variables) + assert(!zix_thread_create(&reader_thread, stack_size, reader, NULL)); + + ZixThread writer_thread; // NOLINT(cppcoreguidelines-init-variables) + assert(!zix_thread_create(&writer_thread, stack_size, writer, NULL)); assert(!zix_thread_join(reader_thread)); assert(!zix_thread_join(writer_thread)); |