[mythtv-commits] Ticket #13528: DVBChannel::ReturnMasterLock violates constness of variable

MythTV noreply at mythtv.org
Sat Nov 30 14:49:32 UTC 2019


#13528: DVBChannel::ReturnMasterLock violates constness of variable
--------------------------------------+-------------------------
     Reporter:  David Hampton         |      Owner:  (none)
         Type:  Bug Report - General  |     Status:  new
     Priority:  minor                 |  Milestone:  31.0
    Component:  MythTV - DVB          |    Version:  Master Head
     Severity:  medium                |   Keywords:
Ticket locked:  0                     |
--------------------------------------+-------------------------
 There are two version of DVBChannel::ReturnMasterLock in the code, the
 second taking a const pointer.  It then casts away the constness of the
 variable and calls a function that appears to modify the variable.  This
 is undefined behavior according to the standard.

 Removing the const_cast and changing the parameter to be non-const
 requires a cascading series of changes to functions and parameters.  This
 should be looked at by someone familiar with the DVB code.

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13528>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list