Opened 11 years ago

Closed 11 years ago

Last modified 11 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

Description

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).

https://github.com/garybuhrmaster/mythtv/commit/234e9884d98e3fccd2a18570507c14dd4627b65a

Change History (2)

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

Resolution: fixed
Status: newclosed

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 11 years ago by paulh

Milestone: unknown0.27
Note: See TracTickets for help on using tickets.