Opened 16 years ago

Closed 15 years ago

#5566 closed defect (fixed)

uninitialization defects in mythmusic

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: trivial Milestone: unknown
Component: mythmusic Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

There are a few initialization defects in mythmusic. The attached patch fixes the ones that the static analysis tool can find.

Note that there are few class ctor and member function declaration changes to suppress warnings and remove unused parameters. But everything else should be mild.

Attachments (3)

mythmusic-uninit.patch (13.6 KB) - added by Erik Hovland <erik@…> 16 years ago.
Tries to fix all of the initialization defects in mythmusic
mythmusic-uninit-ticket-5566.patch (11.8 KB) - added by Erik Hovland <erik@…> 16 years ago.
Same patch w/out the switchToPlugin() mangling
mythmusic-uninit.2.patch (7.6 KB) - added by Erik Hovland <erik@…> 16 years ago.
some more classes with ctor initialization issues (especially Decoder classes)

Download all attachments as: .zip

Change History (10)

Changed 16 years ago by Erik Hovland <erik@…>

Attachment: mythmusic-uninit.patch added

Tries to fix all of the initialization defects in mythmusic

comment:1 Changed 16 years ago by paulh

Your changes to libvisualplugin{h,cpp} will break the libvisual visualizer. It supports more than one visualizer and the pluginName is the name of a visualizer plugin that it should switch to.

comment:2 Changed 16 years ago by Erik Hovland <erik@…>

According to the compiler pluginName is never used in switchToPlugin(), so it is never used anywhere else. If this is an oversight, then my patch will cause no problems. If it is in there for future work, then I will gladly rework the patch.

comment:3 Changed 16 years ago by paulh

Actually Daniel broke things in [17906] it's back to how it should be now. He must have thought you could rely on m_currentPlugin pointing to the correct plugin at start, it's just there to make it possible to test the libvisual plugins by iterating though the list of supported plugins it's not used in normal operation.

comment:4 Changed 16 years ago by Erik Hovland <erik@…>

I'll rework my patch accordingly. Thanks.

Changed 16 years ago by Erik Hovland <erik@…>

Same patch w/out the switchToPlugin() mangling

Changed 16 years ago by Erik Hovland <erik@…>

Attachment: mythmusic-uninit.2.patch added

some more classes with ctor initialization issues (especially Decoder classes)

comment:5 Changed 16 years ago by Nigel

Looking at the decoder initialisations, I'm wondering if it would be tidier to rationalise and move those variables into the parent Decoder class? While it is possible that a decoder doesn't use all of the vars, the sub-classes would be tidier if they only added variables that are unique to that particular device or format?

comment:6 Changed 16 years ago by Erik Hovland <erik@…>

I agree. I am likely to go in that direction if no one commits this patch any time soon.

comment:7 Changed 15 years ago by danielk

Resolution: fixed
Status: newclosed

(In [19449]) Fixes #5566. Initialze all vars in ctors.

PS I agree with Nigel & Mark these classes could use some refacoring.

Note: See TracTickets for help on using tickets.