Fixed a bunch of compiler warnings.
This commit is contained in:
@@ -33,7 +33,7 @@ ServerGuiWrapper::~ServerGuiWrapper()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerGuiWrapper::initGui(int speed) {}
|
void ServerGuiWrapper::initGui(int /*speed*/) {}
|
||||||
|
|
||||||
Session &ServerGuiWrapper::getSession()
|
Session &ServerGuiWrapper::getSession()
|
||||||
{
|
{
|
||||||
@@ -50,21 +50,21 @@ void ServerGuiWrapper::refreshSet() const {}
|
|||||||
|
|
||||||
void ServerGuiWrapper::refreshCash() const {}
|
void ServerGuiWrapper::refreshCash() const {}
|
||||||
|
|
||||||
void ServerGuiWrapper::refreshAction(int playerID, int playerAction) const {}
|
void ServerGuiWrapper::refreshAction(int /*playerID*/, int /*playerAction*/) const {}
|
||||||
|
|
||||||
void ServerGuiWrapper::refreshChangePlayer() const {}
|
void ServerGuiWrapper::refreshChangePlayer() const {}
|
||||||
|
|
||||||
void ServerGuiWrapper::refreshAll() const {}
|
void ServerGuiWrapper::refreshAll() const {}
|
||||||
|
|
||||||
void ServerGuiWrapper::refreshPot() const {}
|
void ServerGuiWrapper::refreshPot() const {}
|
||||||
void ServerGuiWrapper::refreshGroupbox(int playerID, int status) const {}
|
void ServerGuiWrapper::refreshGroupbox(int /*playerID*/, int /*status*/) const {}
|
||||||
void ServerGuiWrapper::refreshPlayerName() const {}
|
void ServerGuiWrapper::refreshPlayerName() const {}
|
||||||
void ServerGuiWrapper::refreshButton() const {}
|
void ServerGuiWrapper::refreshButton() const {}
|
||||||
void ServerGuiWrapper::refreshGameLabels(GameState state) const {}
|
void ServerGuiWrapper::refreshGameLabels(GameState /*state*/) const {}
|
||||||
|
|
||||||
void ServerGuiWrapper::waitForGuiUpdateDone() const {}
|
void ServerGuiWrapper::waitForGuiUpdateDone() const {}
|
||||||
|
|
||||||
void ServerGuiWrapper::dealBeRoCards(int myBeRoID) {}
|
void ServerGuiWrapper::dealBeRoCards(int /*myBeRoID*/) {}
|
||||||
void ServerGuiWrapper::dealHoleCards() {}
|
void ServerGuiWrapper::dealHoleCards() {}
|
||||||
void ServerGuiWrapper::dealFlopCards() {}
|
void ServerGuiWrapper::dealFlopCards() {}
|
||||||
void ServerGuiWrapper::dealTurnCard() {}
|
void ServerGuiWrapper::dealTurnCard() {}
|
||||||
@@ -72,7 +72,7 @@ void ServerGuiWrapper::dealRiverCard() {}
|
|||||||
|
|
||||||
void ServerGuiWrapper::nextPlayerAnimation() {}
|
void ServerGuiWrapper::nextPlayerAnimation() {}
|
||||||
|
|
||||||
void ServerGuiWrapper::beRoAnimation2(int myBeRoID) {}
|
void ServerGuiWrapper::beRoAnimation2(int /*myBeRoID*/) {}
|
||||||
|
|
||||||
void ServerGuiWrapper::preflopAnimation1() {}
|
void ServerGuiWrapper::preflopAnimation1() {}
|
||||||
void ServerGuiWrapper::preflopAnimation2() {}
|
void ServerGuiWrapper::preflopAnimation2() {}
|
||||||
@@ -95,15 +95,15 @@ void ServerGuiWrapper::nextRoundCleanGui() {}
|
|||||||
|
|
||||||
void ServerGuiWrapper::meInAction() {}
|
void ServerGuiWrapper::meInAction() {}
|
||||||
void ServerGuiWrapper::disableMyButtons() {}
|
void ServerGuiWrapper::disableMyButtons() {}
|
||||||
void ServerGuiWrapper::startTimeoutAnimation(int playerId, int timeoutSec) {}
|
void ServerGuiWrapper::startTimeoutAnimation(int /*playerId*/, int /*timeoutSec*/) {}
|
||||||
void ServerGuiWrapper::stopTimeoutAnimation(int playerId) {}
|
void ServerGuiWrapper::stopTimeoutAnimation(int /*playerId*/) {}
|
||||||
|
|
||||||
void ServerGuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) {}
|
void ServerGuiWrapper::logPlayerActionMsg(string /*playerName*/, int /*action*/, int /*setValue*/) {}
|
||||||
void ServerGuiWrapper::logNewGameHandMsg(int gameID, int handID) {}
|
void ServerGuiWrapper::logNewGameHandMsg(int /*gameID*/, int /*handID*/) {}
|
||||||
void ServerGuiWrapper::logPlayerWinsMsg(int playerID, int pot) {}
|
void ServerGuiWrapper::logPlayerWinsMsg(int /*playerID*/, int /*pot*/) {}
|
||||||
void ServerGuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) {}
|
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
|
||||||
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt, std::string showHas) {}
|
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
|
||||||
void ServerGuiWrapper::logPlayerWinGame(std::string playerName, int gameID) {}
|
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
||||||
|
|
||||||
void ServerGuiWrapper::SignalNetClientConnect(int actionID) { if (myClientcb) myClientcb->SignalNetClientConnect(actionID); }
|
void ServerGuiWrapper::SignalNetClientConnect(int actionID) { if (myClientcb) myClientcb->SignalNetClientConnect(actionID); }
|
||||||
void ServerGuiWrapper::SignalNetClientGameInfo(int actionID) { if (myClientcb) myClientcb->SignalNetClientGameInfo(actionID); }
|
void ServerGuiWrapper::SignalNetClientGameInfo(int actionID) { if (myClientcb) myClientcb->SignalNetClientGameInfo(actionID); }
|
||||||
|
|||||||
@@ -31,11 +31,12 @@ using namespace std;
|
|||||||
|
|
||||||
struct IrcContext
|
struct IrcContext
|
||||||
{
|
{
|
||||||
IrcContext(IrcThread &t) : ircThread(t), session(NULL), serverPort(0) {}
|
IrcContext(IrcThread &t) : ircThread(t), session(NULL), serverPort(0), useIPv6(false) {}
|
||||||
IrcThread &ircThread;
|
IrcThread &ircThread;
|
||||||
irc_session_t *session;
|
irc_session_t *session;
|
||||||
string serverAddress;
|
string serverAddress;
|
||||||
unsigned serverPort;
|
unsigned serverPort;
|
||||||
|
bool useIPv6;
|
||||||
string nick;
|
string nick;
|
||||||
string channel;
|
string channel;
|
||||||
};
|
};
|
||||||
@@ -87,7 +88,7 @@ void irc_handle_server_error(irc_session_t *session, unsigned irc_error_code)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
irc_event_connect(irc_session_t *session, const char *irc_event, const char *origin, const char **params, unsigned count)
|
irc_event_connect(irc_session_t *session, const char */*irc_event*/, const char *origin, const char **/*params*/, unsigned /*count*/)
|
||||||
{
|
{
|
||||||
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
||||||
|
|
||||||
@@ -96,7 +97,7 @@ irc_event_connect(irc_session_t *session, const char *irc_event, const char *ori
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
irc_event_join(irc_session_t *session, const char *irc_event, const char *origin, const char **params, unsigned count)
|
irc_event_join(irc_session_t *session, const char */*irc_event*/, const char *origin, const char **/*params*/, unsigned /*count*/)
|
||||||
{
|
{
|
||||||
// someone joined the channel.
|
// someone joined the channel.
|
||||||
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
||||||
@@ -108,12 +109,12 @@ irc_event_join(irc_session_t *session, const char *irc_event, const char *origin
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
irc_event_nick(irc_session_t *session, const char *irc_event, const char *origin, const char **params, unsigned count)
|
irc_event_nick(irc_session_t *session, const char */*irc_event*/, const char *origin, const char **params, unsigned count)
|
||||||
{
|
{
|
||||||
// someone changed his/her nick
|
// someone changed his/her nick
|
||||||
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
||||||
|
|
||||||
if (context->nick != params[0]) // only act if this was not an auto-rename
|
if (count && context->nick != params[0]) // only act if this was not an auto-rename
|
||||||
{
|
{
|
||||||
if (context->nick == origin)
|
if (context->nick == origin)
|
||||||
context->nick = params[0];
|
context->nick = params[0];
|
||||||
@@ -122,7 +123,7 @@ irc_event_nick(irc_session_t *session, const char *irc_event, const char *origin
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
irc_event_kick(irc_session_t *session, const char *irc_event, const char *origin, const char **params, unsigned count)
|
irc_event_kick(irc_session_t *session, const char */*irc_event*/, const char *origin, const char **params, unsigned count)
|
||||||
{
|
{
|
||||||
// someone got kicked
|
// someone got kicked
|
||||||
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
||||||
@@ -140,7 +141,7 @@ irc_event_kick(irc_session_t *session, const char *irc_event, const char *origin
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
irc_event_leave(irc_session_t *session, const char *irc_event, const char *origin, const char **params, unsigned count)
|
irc_event_leave(irc_session_t *session, const char */*irc_event*/, const char *origin, const char **/*params*/, unsigned /*count*/)
|
||||||
{
|
{
|
||||||
// someone left the channel.
|
// someone left the channel.
|
||||||
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
||||||
@@ -149,20 +150,20 @@ irc_event_leave(irc_session_t *session, const char *irc_event, const char *origi
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
irc_event_channel(irc_session_t *session, const char *irc_event, const char *origin, const char **params, unsigned count)
|
irc_event_channel(irc_session_t *session, const char */*irc_event*/, const char *origin, const char **params, unsigned count)
|
||||||
{
|
{
|
||||||
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
IrcContext *context = (IrcContext *) irc_get_ctx(session);
|
||||||
|
|
||||||
if (context->channel == params[0]) // check whether this message is for our channel
|
if (count >= 2 && context->channel == params[0]) // check whether this message is for our channel
|
||||||
{
|
{
|
||||||
// Signal the message (if any) to GUI.
|
// Signal the message (if any) to GUI.
|
||||||
if (params[1] && *params[1] != 0)
|
if (*params[1] != 0)
|
||||||
context->ircThread.GetCallback().SignalIrcChatMsg(origin, params[1]);
|
context->ircThread.GetCallback().SignalIrcChatMsg(origin, params[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
irc_event_numeric(irc_session_t * session, unsigned irc_event, const char *origin, const char **params, unsigned count)
|
irc_event_numeric(irc_session_t * session, unsigned irc_event, const char */*origin*/, const char **params, unsigned count)
|
||||||
{
|
{
|
||||||
switch (irc_event)
|
switch (irc_event)
|
||||||
{
|
{
|
||||||
@@ -254,6 +255,7 @@ IrcThread::Init(const std::string &serverAddress, unsigned serverPort, bool ipv6
|
|||||||
|
|
||||||
context.serverAddress = serverAddress;
|
context.serverAddress = serverAddress;
|
||||||
context.serverPort = serverPort;
|
context.serverPort = serverPort;
|
||||||
|
context.useIPv6 = ipv6;
|
||||||
context.nick = nick;
|
context.nick = nick;
|
||||||
context.channel = channel;
|
context.channel = channel;
|
||||||
|
|
||||||
|
|||||||
@@ -862,7 +862,7 @@ ServerGameStateComputerAction::Process(ServerGameThread &server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerGameStateComputerAction::InternalProcess(ServerGameThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet)
|
ServerGameStateComputerAction::InternalProcess(ServerGameThread &/*server*/, SessionWrapper /*session*/, boost::shared_ptr<NetPacket> /*packet*/)
|
||||||
{
|
{
|
||||||
return MSG_SOCK_INTERNAL_PENDING;
|
return MSG_SOCK_INTERNAL_PENDING;
|
||||||
}
|
}
|
||||||
@@ -917,7 +917,7 @@ ServerGameStateDealCardsDelay::Process(ServerGameThread &server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerGameStateDealCardsDelay::InternalProcess(ServerGameThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet)
|
ServerGameStateDealCardsDelay::InternalProcess(ServerGameThread &/*server*/, SessionWrapper /*session*/, boost::shared_ptr<NetPacket> /*packet*/)
|
||||||
{
|
{
|
||||||
return MSG_SOCK_INTERNAL_PENDING;
|
return MSG_SOCK_INTERNAL_PENDING;
|
||||||
}
|
}
|
||||||
@@ -961,7 +961,7 @@ ServerGameStateShowCardsDelay::Process(ServerGameThread &server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerGameStateShowCardsDelay::InternalProcess(ServerGameThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet)
|
ServerGameStateShowCardsDelay::InternalProcess(ServerGameThread &/*server*/, SessionWrapper /*session*/, boost::shared_ptr<NetPacket> /*packet*/)
|
||||||
{
|
{
|
||||||
return MSG_SOCK_INTERNAL_PENDING;
|
return MSG_SOCK_INTERNAL_PENDING;
|
||||||
}
|
}
|
||||||
@@ -999,7 +999,7 @@ ServerGameStateNextHandDelay::Process(ServerGameThread &server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerGameStateNextHandDelay::InternalProcess(ServerGameThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet)
|
ServerGameStateNextHandDelay::InternalProcess(ServerGameThread &/*server*/, SessionWrapper /*session*/, boost::shared_ptr<NetPacket> /*packet*/)
|
||||||
{
|
{
|
||||||
return MSG_SOCK_INTERNAL_PENDING;
|
return MSG_SOCK_INTERNAL_PENDING;
|
||||||
}
|
}
|
||||||
@@ -1060,7 +1060,7 @@ ServerGameStateNextGameDelay::Process(ServerGameThread &server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerGameStateNextGameDelay::InternalProcess(ServerGameThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet)
|
ServerGameStateNextGameDelay::InternalProcess(ServerGameThread &/*server*/, SessionWrapper /*session*/, boost::shared_ptr<NetPacket> /*packet*/)
|
||||||
{
|
{
|
||||||
return MSG_SOCK_INTERNAL_PENDING;
|
return MSG_SOCK_INTERNAL_PENDING;
|
||||||
}
|
}
|
||||||
@@ -1087,7 +1087,7 @@ ServerGameStateFinal::~ServerGameStateFinal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerGameStateFinal::InternalProcess(ServerGameThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet)
|
ServerGameStateFinal::InternalProcess(ServerGameThread &/*server*/, SessionWrapper /*session*/, boost::shared_ptr<NetPacket> /*packet*/)
|
||||||
{
|
{
|
||||||
return MSG_SOCK_INTERNAL_PENDING;
|
return MSG_SOCK_INTERNAL_PENDING;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public:
|
|||||||
ServerSenderCallback(ServerGameThread &server) : m_server(server) {}
|
ServerSenderCallback(ServerGameThread &server) : m_server(server) {}
|
||||||
virtual ~ServerSenderCallback() {}
|
virtual ~ServerSenderCallback() {}
|
||||||
|
|
||||||
virtual void SignalNetError(SOCKET sock, int errorID, int osErrorID)
|
virtual void SignalNetError(SOCKET /*sock*/, int /*errorID*/, int /*osErrorID*/)
|
||||||
{
|
{
|
||||||
// We just ignore send errors for now, on server side.
|
// We just ignore send errors for now, on server side.
|
||||||
// A serious send error should trigger a read error or a read
|
// A serious send error should trigger a read error or a read
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
ServerSenderCallback(ServerLobbyThread &server) : m_server(server) {}
|
ServerSenderCallback(ServerLobbyThread &server) : m_server(server) {}
|
||||||
virtual ~ServerSenderCallback() {}
|
virtual ~ServerSenderCallback() {}
|
||||||
|
|
||||||
virtual void SignalNetError(SOCKET sock, int errorID, int osErrorID)
|
virtual void SignalNetError(SOCKET /*sock*/, int /*errorID*/, int /*osErrorID*/)
|
||||||
{
|
{
|
||||||
// We just ignore send errors for now, on server side.
|
// We just ignore send errors for now, on server side.
|
||||||
// A serious send error should trigger a read error or a read
|
// A serious send error should trigger a read error or a read
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
socket_string_to_addr(const char *str, int addrFamily, struct sockaddr * addr, int addrLen)
|
socket_string_to_addr(const char *str, int addrFamily, struct sockaddr *addr, int /*addrLen*/)
|
||||||
{
|
{
|
||||||
if (addrFamily == AF_INET)
|
if (addrFamily == AF_INET)
|
||||||
return (inet_pton(addrFamily, str, &((struct sockaddr_in *)addr)->sin_addr) == 1);
|
return (inet_pton(addrFamily, str, &((struct sockaddr_in *)addr)->sin_addr) == 1);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ using namespace std;
|
|||||||
volatile int g_pokerthTerminate = 0;
|
volatile int g_pokerthTerminate = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
TerminateHandler(int signal)
|
TerminateHandler(int /*signal*/)
|
||||||
{
|
{
|
||||||
g_pokerthTerminate = 1;
|
g_pokerthTerminate = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user