Skip to content

Commit

Permalink
tidy: Remove a couple of variable assignment that are immediately ove…
Browse files Browse the repository at this point in the history
…rwritten.

This check has been around for some time, but clang 16 finds two new
instances of code that assigns a variable that is never used.

https://clang.llvm.org/docs/analyzer/checkers.html#deadcode-deadstores
  • Loading branch information
linuxdude42 committed May 13, 2023
1 parent dfea142 commit 0a6a75a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythnotificationcenter.cpp
Expand Up @@ -498,7 +498,7 @@ void MythNotificationScreen::SetErrorState(void) const
if (!m_errorState)
return;

const char *state = "ok";
const char *state {nullptr};

if (m_type == MythNotification::Error)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythtranscode/transcode.cpp
Expand Up @@ -882,7 +882,7 @@ int Transcode::TranscodeFile(const QString &inputname,
if (!fifodir.isEmpty())
{
AudioPlayer *aplayer = player->GetAudio();
const char *audio_codec_name = "unknown";
const char *audio_codec_name {nullptr};

switch(aplayer->GetCodec())
{
Expand Down

0 comments on commit 0a6a75a

Please sign in to comment.