Skip to content

Commit

Permalink
tidy: Add missing 'else' in TVRec::GetMaxBitrate.
Browse files Browse the repository at this point in the history
The clang-tidy "dead stores" checker pointed out that a variable in
the TVRec::GetMaxBitrate function is set, but that value is never
used.  Investigating the code, when a recording profile for HDPVR
support was added in 2008 an 'if blah' was added to the code in the
middle of a series of 'else if blah' statements.  Adding the 'else'
missing keyword eliminates the warning message.

This errant code didn't cause a user visible error as the value in
the final 'else' clause matched the value in the earlier dead code.
  • Loading branch information
linuxdude42 committed Mar 26, 2019
1 parent e6a3928 commit 7db8adf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/tv_rec.cpp
Expand Up @@ -2635,7 +2635,7 @@ long long TVRec::GetMaxBitrate(void) const
long long bitrate;
if (m_genOpt.inputtype == "MPEG")
bitrate = 10080000LL; // use DVD max bit rate
if (m_genOpt.inputtype == "HDPVR")
else if (m_genOpt.inputtype == "HDPVR")
bitrate = 20200000LL; // Peek bit rate for HD-PVR
else if (!CardUtil::IsEncoder(m_genOpt.inputtype))
bitrate = 22200000LL; // 1080i
Expand Down

0 comments on commit 7db8adf

Please sign in to comment.