Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 11 months ago

Closed 11 months ago

Last modified 10 months 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

Attachments (0)

Change History (2)

comment:1 Changed 11 months 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 10 months ago by paulh

  • Milestone changed from unknown to 0.27

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


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

 
Note: See TracTickets for help on using tickets.