Ticket #5297: libs_libmyth-uninit-defects.patch

File libs_libmyth-uninit-defects.patch, 3.2 KB (added by Erik Hovland <erik@…>, 16 years ago)
  • libs/libmyth/lcddevice.h

    Incompasses all uninitialized value defects in libs/libmyth/.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmyth/lcddevice.h         |    7 +------
     libs/libmyth/screensaver-x11.cpp |    3 ++-
     libs/libmyth/uitypes.cpp         |   13 +++++++------
     libs/libmyth/xmlparse.cpp        |    2 +-
     4 files changed, 11 insertions(+), 14 deletions(-)
    
    diff --git a/libs/libmyth/lcddevice.h b/libs/libmyth/lcddevice.h
    index 1ad24df..6b75ad9 100644
    a b enum CHECKED_STATE {CHECKED = 0, UNCHECKED, NOTCHECKABLE }; 
    2121class MPUBLIC LCDMenuItem
    2222{
    2323  public:
    24     LCDMenuItem() {}
    2524    LCDMenuItem(bool item_selected, CHECKED_STATE item_checked,
    2625                QString item_name, unsigned int item_indent  = 0)
    2726    {
    2827        selected = item_selected;
    2928        checked = item_checked;
    3029        name = item_name;
     30        scroll = false;
    3131        indent = item_indent;
    3232        scroll = false;
    3333        scrollPosition = indent;
    3434    }
    3535
    36    ~LCDMenuItem() {}
    37 
    3836    CHECKED_STATE isChecked() { return checked; }
    3937    bool isSelected() { return selected; }
    4038    QString ItemName() { return name; }
    enum TEXT_ALIGNMENT {ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTERED }; 
    6462class MPUBLIC LCDTextItem
    6563{
    6664  public:
    67     LCDTextItem() {}
    6865    LCDTextItem(unsigned int row, TEXT_ALIGNMENT align, QString text,
    6966                QString screen = "Generic", bool scroll = false,
    7067                QString widget = "textWidget")
    class MPUBLIC LCDTextItem 
    7774        itemScrollable = scroll;
    7875    }
    7976
    80    ~LCDTextItem(){};
    81 
    8277    unsigned int getRow() { return itemRow; }
    8378    TEXT_ALIGNMENT getAlignment() { return itemAlignment; }
    8479    QString getText() { return itemText; }
  • libs/libmyth/screensaver-x11.cpp

    diff --git a/libs/libmyth/screensaver-x11.cpp b/libs/libmyth/screensaver-x11.cpp
    index b907e33..c24f572 100644
    a b class ScreenSaverX11Private 
    149149  private:
    150150    struct ScreenSaverState
    151151    {
    152         ScreenSaverState() : saved(false) {}
     152        ScreenSaverState() : saved(false), timeout(-1), interval(-1),
     153            preferblank(-1), allowexposure(-1) {}
    153154        bool saved;
    154155        int timeout;
    155156        int interval;
  • libs/libmyth/uitypes.cpp

    diff --git a/libs/libmyth/uitypes.cpp b/libs/libmyth/uitypes.cpp
    index 0bfca64..3fa04b5 100644
    a b using namespace std; 
    2424#undef LoadImage
    2525#endif
    2626
    27 LayerSet::LayerSet(const QString &name)
     27LayerSet::LayerSet(const QString &name) :
     28    m_debug(false),
     29    m_context(-1),
     30    m_order(-1),
     31    m_name(name),
     32    numb_layers(-1),
     33    allTypes(new vector<UIType *>)
    2834{
    29     m_name = name;
    30     m_context = -1;
    31     m_debug = false;
    32     numb_layers = -1;
    33     allTypes = new vector<UIType *>;
    3435}
    3536
    3637LayerSet::~LayerSet()
  • libs/libmyth/xmlparse.cpp

    diff --git a/libs/libmyth/xmlparse.cpp b/libs/libmyth/xmlparse.cpp
    index fcbb9c4..59d76b4 100644
    a b using namespace std; 
    1919
    2020MPUBLIC QMap<QString, fontProp> globalFontMap;
    2121
    22 XMLParse::XMLParse(void)
     22XMLParse::XMLParse(void) : wmult(0.0), hmult(0.0), usetrans(-1)
    2323{
    2424    allTypes = new vector<LayerSet *>;
    2525}