aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_sanity.cpp
diff options
context:
space:
mode:
authorMatthew Gregan <[email protected]>2016-11-15 16:25:27 +1300
committerMatthew Gregan <[email protected]>2016-11-15 16:25:27 +1300
commit5fd234931fc344713d6beceeebce535d1b1402f6 (patch)
treeb8606ddbed951d1d19f8c76d7d2e83aa1c48fa6d /test/test_sanity.cpp
parentd5599c2402e521b4f6ed056165cd7319a9d5b942 (diff)
downloadcubeb-5fd234931fc344713d6beceeebce535d1b1402f6.tar.gz
cubeb-5fd234931fc344713d6beceeebce535d1b1402f6.zip
Fix existing Clang analyzer warnings to allow warnings-as-errors.
Diffstat (limited to 'test/test_sanity.cpp')
-rw-r--r--test/test_sanity.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp
index cbf2248..18d9315 100644
--- a/test/test_sanity.cpp
+++ b/test/test_sanity.cpp
@@ -66,6 +66,7 @@ static long
test_data_callback(cubeb_stream * stm, void * user_ptr, const void * /*inputbuffer*/, void * outputbuffer, long nframes)
{
EXPECT_TRUE(stm && user_ptr == &dummy && outputbuffer && nframes > 0);
+ assert(outputbuffer);
#if (defined(_WIN32) || defined(__WIN32__))
memset(outputbuffer, 0, nframes * sizeof(float));
#else
@@ -537,6 +538,7 @@ static long
test_drain_data_callback(cubeb_stream * stm, void * user_ptr, const void * /*inputbuffer*/, void * outputbuffer, long nframes)
{
EXPECT_TRUE(stm && user_ptr == &dummy && outputbuffer && nframes > 0);
+ assert(outputbuffer);
if (do_drain == 1) {
do_drain = 2;
return 0;