diff --git a/src/engine/network_engine/clientbero.cpp b/src/engine/network_engine/clientbero.cpp index e12a67ef..afc12b71 100644 --- a/src/engine/network_engine/clientbero.cpp +++ b/src/engine/network_engine/clientbero.cpp @@ -11,7 +11,7 @@ // #include "clientbero.h" -ClientBeRo::ClientBeRo(HandInterface* hi, int id, int qP, int dP, int sB, GameState gS) +ClientBeRo::ClientBeRo(HandInterface* hi, int /*id*/, int /*qP*/, int dP, int sB, GameState gS) : BeRoInterface(), myHand(hi), highestCardsValue(0), myBeRoID(gS), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstRound(1), playersTurn(dP), minimumRaise(0) { } diff --git a/src/engine/network_engine/clientplayer.cpp b/src/engine/network_engine/clientplayer.cpp index 572c4304..722bafd7 100644 --- a/src/engine/network_engine/clientplayer.cpp +++ b/src/engine/network_engine/clientplayer.cpp @@ -165,7 +165,7 @@ ClientPlayer::getMyLastRelativeSet() const } void -ClientPlayer::setMyAction(int theValue, bool blind) +ClientPlayer::setMyAction(int theValue, bool /*blind*/) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); myAction = theValue; @@ -421,20 +421,20 @@ ClientPlayer::riverEngine() void -ClientPlayer::evaluation(int bet, int raise) +ClientPlayer::evaluation(int /*bet*/, int /*raise*/) { } int -ClientPlayer::preflopCardsValue(int* cards) +ClientPlayer::preflopCardsValue(int* /*cards*/) { return 0; } int -ClientPlayer::flopCardsValue(int* cards) +ClientPlayer::flopCardsValue(int* /*cards*/) { return 0; } @@ -446,7 +446,7 @@ ClientPlayer::readFile() } int -ClientPlayer::turnCardsValue(int* cards) +ClientPlayer::turnCardsValue(int* /*cards*/) { return 0; } diff --git a/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialogimpl.cpp b/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialogimpl.cpp index a1eaa0f6..3382dedd 100644 --- a/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialogimpl.cpp +++ b/src/gui/qt/joinnetworkgamedialog/joinnetworkgamedialogimpl.cpp @@ -121,9 +121,9 @@ void joinNetworkGameDialogImpl::fillServerProfileList() { TiXmlElement* profile = docHandle.FirstChild( "PokerTH" ).FirstChild( "ServerProfiles" ).FirstChild().ToElement(); if ( profile ) { - for( profile; profile; profile = profile->NextSiblingElement()) { + for( ; profile; profile = profile->NextSiblingElement()) { - QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget,0); + QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget,0); item->setData(0, 0, QString::fromUtf8(profile->Attribute("Name"))); item->setData(1, 0, QString::fromUtf8(profile->Attribute("Address"))); item->setData(2, 0, profile->Attribute("Port")); diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index a2c2c693..588bf268 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -570,7 +570,6 @@ int ClientStateWaitGame::InternalProcess(ClientThread &client, boost::shared_ptr packet) { int retVal = MSG_SOCK_INTERNAL_PENDING; - ClientContext &context = client.GetContext(); if (packet->ToNetPacketGameStart()) { @@ -653,7 +652,6 @@ int ClientStateWaitHand::InternalProcess(ClientThread &client, boost::shared_ptr packet) { int retVal = MSG_SOCK_INTERNAL_PENDING; - ClientContext &context = client.GetContext(); if (packet->ToNetPacketHandStart()) { @@ -717,7 +715,6 @@ int ClientStateRunHand::InternalProcess(ClientThread &client, boost::shared_ptr packet) { int retVal = MSG_SOCK_INTERNAL_PENDING; - ClientContext &context = client.GetContext(); if (packet.get()) { @@ -1095,7 +1092,7 @@ ClientStateFinal::~ClientStateFinal() } int -ClientStateFinal::Process(ClientThread &client) +ClientStateFinal::Process(ClientThread &/*client*/) { Thread::Msleep(10); diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp index 9cd516ff..1447a982 100644 --- a/src/net/common/clientthread.cpp +++ b/src/net/common/clientthread.cpp @@ -40,7 +40,7 @@ public: ClientSenderCallback(ClientThread &client) : m_client(client) {} virtual ~ClientSenderCallback() {} - virtual void SignalNetError(SOCKET sock, int errorID, int osErrorID) + virtual void SignalNetError(SOCKET /*sock*/, int errorID, int osErrorID) { // For now, we ignore the socket. // Just signal the error. diff --git a/src/net/common/netpacket.cpp b/src/net/common/netpacket.cpp index f2d27771..1c0351d5 100644 --- a/src/net/common/netpacket.cpp +++ b/src/net/common/netpacket.cpp @@ -981,7 +981,7 @@ NetPacketInitAck::ToNetPacketInitAck() const } void -NetPacketInitAck::InternalCheck(const NetPacketHeader* data) const +NetPacketInitAck::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -1186,9 +1186,8 @@ NetPacketGameListUpdate::ToNetPacketGameListUpdate() const } void -NetPacketGameListUpdate::InternalCheck(const NetPacketHeader* data) const +NetPacketGameListUpdate::InternalCheck(const NetPacketHeader*) const { - // Nothing to do. } //----------------------------------------------------------------------------- @@ -1246,7 +1245,7 @@ NetPacketGameListPlayerJoined::ToNetPacketGameListPlayerJoined() const } void -NetPacketGameListPlayerJoined::InternalCheck(const NetPacketHeader* data) const +NetPacketGameListPlayerJoined::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -1306,7 +1305,7 @@ NetPacketGameListPlayerLeft::ToNetPacketGameListPlayerLeft() const } void -NetPacketGameListPlayerLeft::InternalCheck(const NetPacketHeader* data) const +NetPacketGameListPlayerLeft::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -1364,7 +1363,7 @@ NetPacketRetrievePlayerInfo::ToNetPacketRetrievePlayerInfo() const } void -NetPacketRetrievePlayerInfo::InternalCheck(const NetPacketHeader* data) const +NetPacketRetrievePlayerInfo::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -1748,7 +1747,6 @@ NetPacketJoinGameAck::ToNetPacketJoinGameAck() const void NetPacketJoinGameAck::InternalCheck(const NetPacketHeader* data) const { - u_int16_t dataLen = ntohs(data->length); NetPacketJoinGameAckData *tmpData = (NetPacketJoinGameAckData *)data; // Semantic checks int maxNumPlayers = ntohs(tmpData->maxNumberOfPlayers); @@ -1820,7 +1818,7 @@ NetPacketPlayerJoined::ToNetPacketPlayerJoined() const } void -NetPacketPlayerJoined::InternalCheck(const NetPacketHeader* data) const +NetPacketPlayerJoined::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -1878,7 +1876,7 @@ NetPacketPlayerLeft::ToNetPacketPlayerLeft() const } void -NetPacketPlayerLeft::InternalCheck(const NetPacketHeader* data) const +NetPacketPlayerLeft::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -1936,7 +1934,7 @@ NetPacketKickPlayer::ToNetPacketKickPlayer() const } void -NetPacketKickPlayer::InternalCheck(const NetPacketHeader* data) const +NetPacketKickPlayer::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -1973,7 +1971,7 @@ NetPacketStartEvent::ToNetPacketStartEvent() const } void -NetPacketStartEvent::InternalCheck(const NetPacketHeader* data) const +NetPacketStartEvent::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -2907,7 +2905,7 @@ NetPacketEndOfHandHideCards::ToNetPacketEndOfHandHideCards() const } void -NetPacketEndOfHandHideCards::InternalCheck(const NetPacketHeader* data) const +NetPacketEndOfHandHideCards::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -2963,7 +2961,7 @@ NetPacketEndOfGame::ToNetPacketEndOfGame() const } void -NetPacketEndOfGame::InternalCheck(const NetPacketHeader* data) const +NetPacketEndOfGame::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } @@ -3265,7 +3263,7 @@ NetPacketError::ToNetPacketError() const } void -NetPacketError::InternalCheck(const NetPacketHeader* data) const +NetPacketError::InternalCheck(const NetPacketHeader*) const { // Nothing to do. } diff --git a/src/net/common/servergamestate.cpp b/src/net/common/servergamestate.cpp index b72e70e6..03326799 100644 --- a/src/net/common/servergamestate.cpp +++ b/src/net/common/servergamestate.cpp @@ -352,7 +352,7 @@ void AbstractServerGameStateRunning::HandleNewSession(ServerGameThread &server, SessionWrapper session) { // Do not accept new sessions in this state. - // TODO + server.SessionError(session, ERR_NET_GAME_ALREADY_RUNNING); } //----------------------------------------------------------------------------- diff --git a/src/net/netpacket.h b/src/net/netpacket.h index 3d01c2ce..83f2716c 100644 --- a/src/net/netpacket.h +++ b/src/net/netpacket.h @@ -123,6 +123,8 @@ public: protected: + NetPacket &operator=(const NetPacket& right); // not allowed + void Check(const NetPacketHeader *data) const; virtual void InternalCheck(const NetPacketHeader *data) const = 0;