Commit c111dfa0 authored by Tristan Matthews's avatar Tristan Matthews

* #9782: fix warnings in tests

parent e2808515
......@@ -80,7 +80,8 @@ void AudioLayerTest::testAudioLayerSwitch()
CPPUNIT_ASSERT(dynamic_cast<AlsaLayer*>(Manager::instance().getAudioDriver()));
wasAlsa = dynamic_cast<AlsaLayer*>(Manager::instance().getAudioDriver()) != 0;
usleep(100000);
const struct timespec req = {0, 100000000};
nanosleep(&req, 0);
}
}
......@@ -90,7 +91,8 @@ void AudioLayerTest::testPulseConnect()
if (dynamic_cast<AlsaLayer*>(Manager::instance().getAudioDriver())) {
Manager::instance().switchAudioManager();
usleep(100000);
const struct timespec req = {0, 100000000};
nanosleep(&req, 0);
}
pulselayer_ = dynamic_cast<PulseLayer*>(Manager::instance().getAudioDriver());
......
......@@ -67,7 +67,7 @@ void DelayDetectionTest::testCrossCorrelationDelay()
delaydetect_.crossCorrelate(ref, signal, result, 3, 10);
float expected[10] = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0};
// float expected[10] = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0};
}
void DelayDetectionTest::testFirFilter()
......
......@@ -865,7 +865,6 @@ void MainBufferTest::testGetPutDataByID()
int test_input2 = 13;
int test_output;
int avail_for_put_testid;
int avail_for_put_defaultid;
// put by default_id get by test_id without preleminary put
......@@ -883,7 +882,7 @@ void MainBufferTest::testGetPutDataByID()
CPPUNIT_ASSERT(test_input1 == test_output);
// get by default_id without preliminary input
avail_for_put_testid = mainbuffer_.availForPut(test_id);
mainbuffer_.availForPut(test_id);
CPPUNIT_ASSERT(mainbuffer_.availForGetByID(test_id, default_id) == 0);
CPPUNIT_ASSERT(mainbuffer_.getDataByID(&test_output, sizeof(int), 100, test_id, default_id) == 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment