diff --git a/xwords4/relay/lstnrmgr.cpp b/xwords4/relay/lstnrmgr.cpp index d01118413..e38bc65bf 100644 --- a/xwords4/relay/lstnrmgr.cpp +++ b/xwords4/relay/lstnrmgr.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/xwords4/relay/rq.c b/xwords4/relay/rq.c index bd33b8bb6..617e9992a 100644 --- a/xwords4/relay/rq.c +++ b/xwords4/relay/rq.c @@ -144,8 +144,8 @@ do_rooms( int sockfd, int lang, int nPlayers ) { unsigned char msg[] = { 0, /* protocol */ PRX_PUB_ROOMS, - lang, - nPlayers }; + (unsigned char)lang, + (unsigned char)nPlayers }; unsigned short len = htons( sizeof(msg) ); write( sockfd, &len, sizeof(len) ); write( sockfd, msg, sizeof(msg) ); @@ -184,7 +184,7 @@ write_connnames( int sockfd, char cmd, len += 1 + strlen( connNames[ii] ); } - unsigned char hdr[] = { 0, cmd }; + unsigned char hdr[] = { 0, (unsigned char)cmd }; unsigned short netNConnNames = htons( nConnNames ); netlen = sizeof(hdr) + sizeof( netNConnNames ) + len; netlen = htons( netlen ); @@ -277,6 +277,7 @@ do_fetch( int sockfd, const char** connNames, int nConnNames, unsigned char reply[1024]; int nRead = read_packet( sockfd, reply, sizeof(reply) ); if ( nRead > 2 ) { + int ii; const unsigned char* bufp = reply; const unsigned char* const end = bufp + nRead; @@ -292,7 +293,7 @@ do_fetch( int sockfd, const char** connNames, int nConnNames, STDOUT -- e.g. by passing in named pipes to correspond to each deviceid provided */ - for ( int ii = 0; ii < count && bufp < end; ++ii ) { + for ( ii = 0; ii < count && bufp < end; ++ii ) { int fd = STDOUT_FILENO; int nbsfd = -1; unsigned short countPerDev; @@ -350,7 +351,6 @@ do_fetch( int sockfd, const char** connNames, int nConnNames, nwritten = write( fd, &len, sizeof(len) ); assert( nwritten == sizeof(len) ); - int ii; for ( ii = 0; -1 != nbsfd; ++ii ) { short len; ssize_t nRead = read( nbsfd, &len, sizeof(len) ); diff --git a/xwords4/relay/udpack.cpp b/xwords4/relay/udpack.cpp index 75762b829..5e5a0b97a 100644 --- a/xwords4/relay/udpack.cpp +++ b/xwords4/relay/udpack.cpp @@ -1,4 +1,4 @@ -/* -*- compile-command: "make MEMDEBUG=TRUE -j3"; -*- */ +/* -*- compile-command: "make -j3"; -*- */ /* * Copyright 2013 by Eric House (xwords@eehouse.org). All rights reserved. * @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include "udpack.h" #include "mlock.h"