diff options
author | Paul Adenot <[email protected]> | 2023-11-10 13:49:50 +0100 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2023-11-10 15:31:45 +0100 |
commit | 8b4721e51eb36b66a1a80e858639d4dfb537945a (patch) | |
tree | a09478dda65fbca282a5a9c30eb212ab1b3ab140 /test | |
parent | 6f0f14714845eda7f4bd1d816d8ecfc6da04325d (diff) | |
download | cubeb-8b4721e51eb36b66a1a80e858639d4dfb537945a.tar.gz cubeb-8b4721e51eb36b66a1a80e858639d4dfb537945a.zip |
Non functional change: fix unified compilation issue -- make callbacks static
Diffstat (limited to 'test')
-rw-r--r-- | test/test_devices.cpp | 6 | ||||
-rw-r--r-- | test/test_logging.cpp | 6 | ||||
-rw-r--r-- | test/test_overload_callback.cpp | 6 | ||||
-rw-r--r-- | test/test_ring_buffer.cpp | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/test/test_devices.cpp b/test/test_devices.cpp index 76e9615..a194663 100644 --- a/test/test_devices.cpp +++ b/test/test_devices.cpp @@ -18,13 +18,15 @@ //#define ENABLE_VERBOSE_LOG #include "common.h" -long data_cb_duplex(cubeb_stream * stream, void * user, const void * inputbuffer, void * outputbuffer, long nframes) +static long +data_cb_duplex(cubeb_stream * stream, void * user, const void * inputbuffer, void * outputbuffer, long nframes) { // noop, unused return 0; } -void state_cb_duplex(cubeb_stream * stream, void * /*user*/, cubeb_state state) +static void +state_cb_duplex(cubeb_stream * stream, void * /*user*/, cubeb_state state) { // noop, unused } diff --git a/test/test_logging.cpp b/test/test_logging.cpp index 5d9691d..fef8e20 100644 --- a/test/test_logging.cpp +++ b/test/test_logging.cpp @@ -26,7 +26,7 @@ std::atomic<uint32_t> log_statements_received = {0}; std::atomic<uint32_t> data_callback_call_count = {0}; -void +static void test_logging_callback(char const * fmt, ...) { log_statements_received++; @@ -40,7 +40,7 @@ test_logging_callback(char const * fmt, ...) #endif // PRINT_LOGS_TO_STDERR } -long +static long data_cb_load(cubeb_stream * stream, void * user, const void * inputbuffer, void * outputbuffer, long nframes) { @@ -48,7 +48,7 @@ data_cb_load(cubeb_stream * stream, void * user, const void * inputbuffer, return nframes; } -void +static void state_cb(cubeb_stream * stream, void * /*user*/, cubeb_state state) { if (stream == NULL) diff --git a/test/test_overload_callback.cpp b/test/test_overload_callback.cpp index c8f4daf..502489c 100644 --- a/test/test_overload_callback.cpp +++ b/test/test_overload_callback.cpp @@ -24,7 +24,8 @@ std::atomic<bool> load_callback{ false }; -long data_cb(cubeb_stream * stream, void * user, const void * inputbuffer, void * outputbuffer, long nframes) +static long +data_cb(cubeb_stream * stream, void * user, const void * inputbuffer, void * outputbuffer, long nframes) { if (load_callback) { fprintf(stderr, "Sleeping...\n"); @@ -34,7 +35,8 @@ long data_cb(cubeb_stream * stream, void * user, const void * inputbuffer, void return nframes; } -void state_cb(cubeb_stream * stream, void * /*user*/, cubeb_state state) +static void +state_cb(cubeb_stream * stream, void * /*user*/, cubeb_state state) { ASSERT_TRUE(!!stream); diff --git a/test/test_ring_buffer.cpp b/test/test_ring_buffer.cpp index cfaedd5..203b9f6 100644 --- a/test/test_ring_buffer.cpp +++ b/test/test_ring_buffer.cpp @@ -5,7 +5,9 @@ * accompanying file LICENSE for details. */ +#ifndef NOMINMAX #define NOMINMAX +#endif #include "gtest/gtest.h" #include "cubeb_ringbuffer.h" |