Modify

Opened 6 years ago

Closed 6 years ago

#10481 closed Patch - Bug Fix (fixed)

Correct empty body warning in metadatafactory.cpp

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by:
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

In metadatafactory.cpp there is a detected (by clang) if statement with an empty body of the form:

if (metadata);

Lookup(metadata, true, true);

such that the Lookup function is called regardless of the value of metadata. It appears that at some point in the past the Lookup function was changed to check for a NULL input, and return immediately, so the check is not technically required. However, for belt and suspenders purposes, I am providing a patch that simply removes the ';', so that the check for NULL will occur in this code (and is what I suspect was the intended purpose of the if).

Thanks.

Gary

Attachments (1)

metadatafactory_cpp.diff (543 bytes) - added by Gary Buhrmaster <gary.buhrmaster@…> 6 years ago.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by Gary Buhrmaster <gary.buhrmaster@…>

comment:1 Changed 6 years ago by Github

  • Milestone changed from unknown to 0.25
  • Resolution set to fixed
  • Status changed from new to closed

Remove extraneous ; in MetadataFactory?.

Gary came up with an explanation that makes the author (me) sound much better than what actually probably occurred, which is my fingers working on autopilot.

Behavior should be totally unchanged.

Fixes #10481.

Branch: master Changeset: aefc7ced019beb1f722d16e56917c9e22e452a6d

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
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.