diff --git a/ksirk/GameLogic/gameautomaton.cpp b/ksirk/GameLogic/gameautomaton.cpp --- a/ksirk/GameLogic/gameautomaton.cpp +++ b/ksirk/GameLogic/gameautomaton.cpp @@ -2197,7 +2197,7 @@ break; case DecrNbArmies: stream >> countryName >> nbArmies; - m_game->theWorld()->countryNamed(countryName)->decrNbArmies(nbArmies); + m_game->theWorld()->countryNamed(countryName)->decrNbArmies(nbArmies); //fallthrough case StartLocalCurrentAI: m_game->startLocalCurrentAI(); break; diff --git a/ksirk/GameLogic/goal.h b/ksirk/GameLogic/goal.h --- a/ksirk/GameLogic/goal.h +++ b/ksirk/GameLogic/goal.h @@ -68,7 +68,10 @@ /** Default destructor */ ~Goal(); - + + /** Assignment operator */ + Goal& operator=( const Goal& other ) = default; + //@{ /** Accessors for the goal type */ inline GoalType type() const {return m_type;} diff --git a/ksirk/iris/src/xmpp/xmpp-core/xmlprotocol.cpp b/ksirk/iris/src/xmpp/xmpp-core/xmlprotocol.cpp --- a/ksirk/iris/src/xmpp/xmpp-core/xmlprotocol.cpp +++ b/ksirk/iris/src/xmpp/xmpp-core/xmlprotocol.cpp @@ -152,9 +152,9 @@ static inline bool validChar(const quint32 ch) { return ch == 0x9 || ch == 0xA || ch == 0xD - || ch >= 0x20 && ch <= 0xD7FF - || ch >= 0xE000 && ch <= 0xFFFD - || ch >= 0x10000 && ch <= 0x10FFFF; + || (ch >= 0x20 && ch <= 0xD7FF) + || (ch >= 0xE000 && ch <= 0xFFFD) + || (ch >= 0x10000 && ch <= 0x10FFFF); } static inline bool lowSurrogate(const quint32 ch) diff --git a/ksirk/iris/src/xmpp/xmpp-im/s5b.cpp b/ksirk/iris/src/xmpp/xmpp-im/s5b.cpp --- a/ksirk/iris/src/xmpp/xmpp-im/s5b.cpp +++ b/ksirk/iris/src/xmpp/xmpp-im/s5b.cpp @@ -845,7 +845,7 @@ void S5BManager::srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data) { Entry *e = findEntryByHash(key); - if(!e->c->d->mode != S5BConnection::Datagram) + if(e->c->d->mode != S5BConnection::Datagram) return; // this key isn't in udp mode? drop! if(init) { @@ -2104,7 +2104,7 @@ void S5BServer::ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data) { - if(port != 0 || port != 1) + if((port != 0) && (port != 1)) return; foreach(S5BManager* m, d->manList) { diff --git a/ksirk/krightdialog.cpp b/ksirk/krightdialog.cpp --- a/ksirk/krightdialog.cpp +++ b/ksirk/krightdialog.cpp @@ -443,31 +443,31 @@ QHBoxLayout * deAtt = new QHBoxLayout(); QHBoxLayout * deDef = new QHBoxLayout(); - if(A1!=0 || A1!=-1) + if(A1!=0 && A1!=-1) { QLabel * de1 = new QLabel(); de1->setPixmap(game->getDice(KGameWindow::Red,A1)); rightContents.insert(0,de1);deAtt->addWidget(de1); } - if(A2!=0 || A2!=-1) + if(A2!=0 && A2!=-1) { QLabel * de2= new QLabel(); de2->setPixmap(game->getDice(KGameWindow::Red,A2)); rightContents.insert(0,de2);deAtt->addWidget(de2); } - if(A3!=0 || A3!=-1) + if(A3!=0 && A3!=-1) { QLabel * de3= new QLabel(); de3->setPixmap(game->getDice(KGameWindow::Red,A3)); rightContents.insert(0,de3);deAtt->addWidget(de3); } - if(D1!=0 || D1!=-1) + if(D1!=0 && D1!=-1) { QLabel * de4= new QLabel(); de4->setPixmap(game->getDice(KGameWindow::Blue,D1)); rightContents.insert(0,de4);deDef->addWidget(de4); } - if(D2!=0 || D2!=-1) + if(D2!=0 && D2!=-1) { QLabel * de5= new QLabel(); de5->setPixmap(game->getDice(KGameWindow::Blue,D2)); diff --git a/ksirkskineditor/onu.cpp b/ksirkskineditor/onu.cpp --- a/ksirkskineditor/onu.cpp +++ b/ksirkskineditor/onu.cpp @@ -778,7 +778,7 @@ void ONU::setFont(const QFont& font) { if (m_font.family == font.family() - && m_font.size == font.pointSize() + && m_font.size == (uint)font.pointSize() && m_font.weight == (QFont::Weight)font.weight() && m_font.italic == font.italic()) return;