D18406: Silence warnings in TabBoxHandler

Martin Flöser <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
graesslin added a comment.


  Now I have the warnings again:
  
    /home/martin/src/kde/workspace/kwin/tabbox/tabboxhandler.cpp: In member function ‘QModelIndex KWin::TabBox::TabBoxHandler::nextPrev(bool) const’:
    /home/martin/src/kde/workspace/kwin/tabbox/tabboxhandler.cpp:465:34: warning: ‘model’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                 row = model->rowCount() - 1;
                       ~~~~~~~~~~~~~~~^~
    /home/martin/src/kde/workspace/kwin/tabbox/tabboxhandler.cpp: In member function ‘QModelIndex KWin::TabBox::TabBoxHandler::first() const’:
    /home/martin/src/kde/workspace/kwin/tabbox/tabboxhandler.cpp:611:29: warning: ‘model’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         return model->index(0, 0);
                                 ^

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D18406

To: graesslin, #kwin
Cc: davidedmundson, zzag, kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.