From 4bcbb3556fedb7082d270ca8c151fcfb0ed13536 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 3 Feb 2023 11:52:41 +0100 Subject: [PATCH] Remove trivially unused variables, as pointed out by -Wunused-variable cherry-picked from https://gitlab.com/serge-sans-paille/soundtouch/-/tree/fix/remove-unused-variables --- source/SoundTouch/BPMDetect.cpp | 2 -- source/SoundTouch/RateTransposer.cpp | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/source/SoundTouch/BPMDetect.cpp b/source/SoundTouch/BPMDetect.cpp index 72a9498..920e968 100644 --- a/source/SoundTouch/BPMDetect.cpp +++ b/source/SoundTouch/BPMDetect.cpp @@ -376,8 +376,6 @@ void BPMDetect::updateBeatPos(int process_samples) // detect beats for (int i = 0; i < skipstep; i++) { - LONG_SAMPLETYPE max = 0; - float sum = beatcorr_ringbuff[beatcorr_ringbuffpos]; sum -= beat_lpf.update(sum); diff --git a/source/SoundTouch/RateTransposer.cpp b/source/SoundTouch/RateTransposer.cpp index e91cd63..1663b60 100644 --- a/source/SoundTouch/RateTransposer.cpp +++ b/source/SoundTouch/RateTransposer.cpp @@ -131,8 +131,6 @@ void RateTransposer::putSamples(const SAMPLETYPE *samples, uint nSamples) // the 'set_returnBuffer_size' function. void RateTransposer::processSamples(const SAMPLETYPE *src, uint nSamples) { - uint count; - if (nSamples == 0) return; // Store samples to input buffer @@ -142,7 +140,7 @@ void RateTransposer::processSamples(const SAMPLETYPE *src, uint nSamples) // the filter if (bUseAAFilter == false) { - count = pTransposer->transpose(outputBuffer, inputBuffer); + (void)pTransposer->transpose(outputBuffer, inputBuffer); return; }