aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/test_devices.cpp6
-rw-r--r--test/test_logging.cpp6
-rw-r--r--test/test_overload_callback.cpp6
-rw-r--r--test/test_ring_buffer.cpp2
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"