From 91b3c7343d17517b81eee7681217028346add2ba Mon Sep 17 00:00:00 2001 From: Bers Date: Sat, 9 Jun 2018 10:28:17 +0200 Subject: [PATCH] fixed 2 warning-errors on archlinux(gcc 8.1): implicit fallthrough, ignored qualifiers (#3270) --- cockatrice/src/carditem.cpp | 2 +- cockatrice/src/gamesmodel.cpp | 4 ++++ cockatrice/src/tab_game.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/carditem.cpp b/cockatrice/src/carditem.cpp index b02afe9d..1c17d510 100644 --- a/cockatrice/src/carditem.cpp +++ b/cockatrice/src/carditem.cpp @@ -317,7 +317,7 @@ void CardItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) 2 * QApplication::startDragDistance()) return; if (zone->getIsView()) { - const ZoneViewZone *const view = static_cast(zone); + const ZoneViewZone *view = static_cast(zone); if (view->getRevealZone() && !view->getWriteableRevealZone()) return; } else if (!owner->getLocal()) diff --git a/cockatrice/src/gamesmodel.cpp b/cockatrice/src/gamesmodel.cpp index 81a112a1..f5fea49c 100644 --- a/cockatrice/src/gamesmodel.cpp +++ b/cockatrice/src/gamesmodel.cpp @@ -196,6 +196,8 @@ QVariant GamesModel::headerData(int section, Qt::Orientation /*orientation*/, in return tr("Age"); case Qt::TextAlignmentRole: return Qt::AlignCenter; + default: + return QVariant(); } } case DESCRIPTION: @@ -212,6 +214,8 @@ QVariant GamesModel::headerData(int section, Qt::Orientation /*orientation*/, in return tr("Players"); case Qt::TextAlignmentRole: return Qt::AlignCenter; + default: + return QVariant(); } } case SPECTATORS: diff --git a/cockatrice/src/tab_game.cpp b/cockatrice/src/tab_game.cpp index 7f564328..33be857f 100644 --- a/cockatrice/src/tab_game.cpp +++ b/cockatrice/src/tab_game.cpp @@ -1029,7 +1029,7 @@ void TabGame::eventPlayerPropertiesChanged(const Event_PlayerPropertiesChanged & playerListWidget->updatePlayerProperties(prop, eventPlayerId); const GameEventContext::ContextType contextType = - static_cast(getPbExtension(context)); + static_cast(getPbExtension(context)); switch (contextType) { case GameEventContext::READY_START: { bool ready = prop.ready_start();