mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
fix warnings
This commit is contained in:
parent
6a5b03f1aa
commit
bf41f95f44
3 changed files with 11 additions and 14 deletions
|
@ -144,10 +144,10 @@ XWThreadPool::get_process_packet( int socket )
|
|||
XWThreadPool::tpool_main( void* closure )
|
||||
{
|
||||
XWThreadPool* me = (XWThreadPool*)closure;
|
||||
me->real_tpool_main();
|
||||
return me->real_tpool_main();
|
||||
}
|
||||
|
||||
void
|
||||
void*
|
||||
XWThreadPool::real_tpool_main()
|
||||
{
|
||||
logf( "worker thread starting" );
|
||||
|
@ -168,6 +168,7 @@ XWThreadPool::real_tpool_main()
|
|||
} /* else drop it: error */
|
||||
}
|
||||
logf( "worker thread exiting" );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -181,7 +182,7 @@ XWThreadPool::interrupt_poll()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
void*
|
||||
XWThreadPool::real_listener()
|
||||
{
|
||||
int flags = POLLIN | POLLERR | POLLHUP;
|
||||
|
@ -252,13 +253,14 @@ XWThreadPool::real_listener()
|
|||
|
||||
free( fds );
|
||||
}
|
||||
return NULL;
|
||||
} /* real_listener */
|
||||
|
||||
/* static */ void*
|
||||
XWThreadPool::listener_main( void* closure )
|
||||
{
|
||||
XWThreadPool* me = (XWThreadPool*)closure;
|
||||
me->real_listener();
|
||||
return me->real_listener();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -52,10 +52,10 @@ class XWThreadPool {
|
|||
int get_process_packet( int socket );
|
||||
void interrupt_poll();
|
||||
|
||||
void real_tpool_main();
|
||||
void* real_tpool_main();
|
||||
static void* tpool_main( void* closure );
|
||||
|
||||
void real_listener();
|
||||
void* real_listener();
|
||||
static void* listener_main( void* closure );
|
||||
|
||||
/* Sockets main thread listens on */
|
||||
|
|
|
@ -127,9 +127,10 @@ processConnect( unsigned char* bufp, int bufLen, int socket )
|
|||
|
||||
if ( bufp < end ) {
|
||||
HostID srcID = getNetShort( &bufp );
|
||||
unsigned short connID = getNetShort( &bufp );
|
||||
CookieID connID = getNetShort( &bufp );
|
||||
if ( bufp == end ) {
|
||||
cref = get_make_cookieRef( cookie );
|
||||
cref = get_make_cookieRef( cookie, connID );
|
||||
assert( cref != NULL );
|
||||
cref->Associate( socket, srcID );
|
||||
Associate( socket, cref );
|
||||
}
|
||||
|
@ -170,7 +171,6 @@ static void
|
|||
sendConnResp( CookieRef* cref, int socket )
|
||||
{
|
||||
/* send cmd, heartbeat, connid */
|
||||
short tmp;
|
||||
unsigned char buf[5];
|
||||
unsigned char* bufp = buf;
|
||||
|
||||
|
@ -213,10 +213,6 @@ forwardMessage( unsigned char* buf, int bufLen )
|
|||
static void
|
||||
processMessage( unsigned char* buf, int bufLen, int socket )
|
||||
{
|
||||
HostID srcID, destID;
|
||||
unsigned short channelNo;
|
||||
long connId;
|
||||
char* cookie;
|
||||
CookieRef* cref;
|
||||
|
||||
XWRELAY_Cmd cmd = *buf;
|
||||
|
@ -278,7 +274,6 @@ make_socket( unsigned long addr, unsigned short port )
|
|||
int main( int argc, char** argv )
|
||||
{
|
||||
int port = 10999;
|
||||
int result;
|
||||
|
||||
if ( argc > 1 ) {
|
||||
port = atoi( argv[1] );
|
||||
|
|
Loading…
Reference in a new issue