Skip to content

Commit

Permalink
tidy: Fix 'value stored is never read' warning in audiooutputbase.cpp.
Browse files Browse the repository at this point in the history
The clang-tidy "dead stores" check pointed out a variable that is set
and never used, because it is assigned to again before it is
referenced.  Remove the first (dead) assignment and reduce the scope
of the variable to the while loop where it is used.
  • Loading branch information
linuxdude42 committed Mar 26, 2019
1 parent b4021b6 commit cfbcf3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mythtv/libs/libmyth/audio/audiooutputbase.cpp
Expand Up @@ -1293,7 +1293,6 @@ bool AudioOutputBase::AddData(void *in_buffer, int in_len,
int64_t timecode, int /*in_frames*/)
{
int frames = in_len / m_source_bytes_per_frame;
void *buffer = in_buffer;
int bpf = m_bytes_per_frame;
int len = in_len;
bool music = false;
Expand Down Expand Up @@ -1340,7 +1339,7 @@ bool AudioOutputBase::AddData(void *in_buffer, int in_len,
len = m_spdifenc->GetProcessedSize();
if (len > 0)
{
buffer = in_buffer = m_spdifenc->GetProcessedBuffer();
in_buffer = m_spdifenc->GetProcessedBuffer();
m_spdifenc->Reset();
frames = len / m_source_bytes_per_frame;
}
Expand Down Expand Up @@ -1418,7 +1417,7 @@ bool AudioOutputBase::AddData(void *in_buffer, int in_len,

while(frames_remaining > 0)
{
buffer = (char *)in_buffer + offset;
void *buffer = (char *)in_buffer + offset;
frames = frames_remaining;
len = frames * m_source_bytes_per_frame;

Expand Down

0 comments on commit cfbcf3b

Please sign in to comment.