[mythtv-commits] Ticket #10481: Correct empty body warning in metadatafactory.cpp

MythTV noreply at mythtv.org
Tue Mar 20 16:58:15 UTC 2012

#10481: Correct empty body warning in metadatafactory.cpp
 Reporter:  Gary Buhrmaster <gary.buhrmaster@…>  |           Type:  Patch -
   Status:  new                                  |  Bug Fix
Milestone:  unknown                              |       Priority:  minor
  Version:  Unspecified                          |      Component:  MythTV
 Keywords:                                       |  - General
                                                 |       Severity:  medium
                                                 |  Ticket locked:  0
 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).



Ticket URL: <http://code.mythtv.org/trac/ticket/10481>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center

More information about the mythtv-commits mailing list