Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11551 closed Patch - Bug Fix (fixed)

Patch for static analysis detected dead assignment in v4lchannel.cpp

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by: danielk
Priority: minor Milestone: 0.27
Component: MythTV - Recording Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


Static analysis (scan-build) detected a dead assignment for the variable field, which is assigned a value in the declaration, but never used before it is assigned a different value. This patch eliminates the dead code (and moves the declaration to a code fragment where other variables are declared and used for this particular expression).

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by Gary Buhrmaster <gary.buhrmaster@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 63e45d8ed181fb8ef9213fe4f320b11b0ce89943/mythtv:

Fix static analysis detected error regarding dead assignment

In v4lchannel.cpp, the int field is assigned a value, and
never used before a later assignment. Move the declaration
and assignment to the code fragment where it is used (as
with some other existing variables). This resolves the
static analysis detected error.

Fixes #11551

comment:2 Changed 5 years ago by paulh

  • Milestone changed from unknown to 0.27

Add Comment

Modify Ticket

as closed The owner will remain danielk.
The resolution will be deleted. Next status will be 'new'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.