From 829fdfd2f93d243bb7faddff3de4f64f0e30dbb9 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 30 Jun 2022 11:49:18 +0100 Subject: [PATCH] Fix compiler warnings in tests --- src/test/TestStretcher.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/test/TestStretcher.cpp b/src/test/TestStretcher.cpp index 13a0429..49b0ce1 100644 --- a/src/test/TestStretcher.cpp +++ b/src/test/TestStretcher.cpp @@ -226,7 +226,6 @@ BOOST_AUTO_TEST_CASE(sinusoid_2x_offline_finer) BOOST_AUTO_TEST_CASE(impulses_2x_offline_faster) { int n = 10000; - float freq = 440.f; int rate = 44100; RubberBandStretcher stretcher (rate, 1, RubberBandStretcher::OptionEngineFaster); @@ -262,7 +261,7 @@ BOOST_AUTO_TEST_CASE(impulses_2x_offline_faster) BOOST_TEST(got == n * 2); BOOST_TEST(stretcher.available() == -1); - int peak0, peak1, peak2; + int peak0 = -1, peak1 = -1, peak2 = -1; float max; max = -2.f; @@ -296,7 +295,6 @@ BOOST_AUTO_TEST_CASE(impulses_2x_offline_faster) BOOST_AUTO_TEST_CASE(impulses_2x_offline_finer) { int n = 10000; - float freq = 440.f; int rate = 44100; RubberBandStretcher stretcher (rate, 1, RubberBandStretcher::OptionEngineFiner); @@ -332,7 +330,7 @@ BOOST_AUTO_TEST_CASE(impulses_2x_offline_finer) BOOST_TEST(got == n * 2); BOOST_TEST(stretcher.available() == -1); - int peak0, peak1, peak2; + int peak0 = -1, peak1 = -1, peak2 = -1; float max; max = -2.f; @@ -366,7 +364,6 @@ BOOST_AUTO_TEST_CASE(impulses_2x_offline_finer) BOOST_AUTO_TEST_CASE(impulses_2x_5up_offline_finer) { int n = 10000; - float freq = 440.f; int rate = 44100; RubberBandStretcher stretcher (rate, 1, RubberBandStretcher::OptionEngineFiner); @@ -403,7 +400,7 @@ BOOST_AUTO_TEST_CASE(impulses_2x_5up_offline_finer) BOOST_TEST(got == n * 2); BOOST_TEST(stretcher.available() == -1); - int peak0, peak1, peak2; + int peak0 = -1, peak1 = -1, peak2 = -1; float max; max = -2.f;