Commit 3aad7a2a authored by Vitaly Lipatov's avatar Vitaly Lipatov

UPDExchange: fix order warning

parent b43bc14b
...@@ -11,9 +11,9 @@ using namespace UniSetExtensions; ...@@ -11,9 +11,9 @@ using namespace UniSetExtensions;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
UDPExchange::UDPExchange( UniSetTypes::ObjectId objId, UniSetTypes::ObjectId shmId, SharedMemory* ic ): UDPExchange::UDPExchange( UniSetTypes::ObjectId objId, UniSetTypes::ObjectId shmId, SharedMemory* ic ):
UniSetObject_LT(objId), UniSetObject_LT(objId),
udp(0),
shm(0), shm(0),
initPause(0), initPause(0),
udp(0),
activated(false), activated(false),
dlist(100), dlist(100),
maxItem(0) maxItem(0)
...@@ -236,8 +236,8 @@ void UDPExchange::recv() ...@@ -236,8 +236,8 @@ void UDPExchange::recv()
// receive // receive
if( udp->isInputReady(recvTimeout) ) if( udp->isInputReady(recvTimeout) )
{ {
int ret = udp->UDPReceive::receive(&h,sizeof(h)); ssize_t ret = udp->UDPReceive::receive(&h,sizeof(h));
if( ret<sizeof(h) ) if( ret<(ssize_t)sizeof(h) )
{ {
cerr << myname << "(receive): ret=" << ret << " sizeof=" << sizeof(h) << endl; cerr << myname << "(receive): ret=" << ret << " sizeof=" << sizeof(h) << endl;
return; return;
...@@ -252,8 +252,8 @@ void UDPExchange::recv() ...@@ -252,8 +252,8 @@ void UDPExchange::recv()
{ {
for( int i=0; i<h.dcount;i++ ) for( int i=0; i<h.dcount;i++ )
{ {
int ret = udp->UDPReceive::receive(&d,sizeof(d)); ssize_t ret = udp->UDPReceive::receive(&d,sizeof(d));
if( ret < sizeof(d) ) if( ret < (ssize_t)sizeof(d) )
return; return;
} }
return; return;
...@@ -261,8 +261,8 @@ void UDPExchange::recv() ...@@ -261,8 +261,8 @@ void UDPExchange::recv()
#endif #endif
for( int i=0; i<h.dcount;i++ ) for( int i=0; i<h.dcount;i++ )
{ {
int ret = udp->UDPReceive::receive(&d,sizeof(d)); ssize_t ret = udp->UDPReceive::receive(&d,sizeof(d));
if( ret<sizeof(d) ) if( ret<(ssize_t)sizeof(d) )
{ {
cerr << myname << "(receive data " << i << "): ret=" << ret << " sizeof=" << sizeof(d) << endl; cerr << myname << "(receive data " << i << "): ret=" << ret << " sizeof=" << sizeof(d) << endl;
break; break;
...@@ -284,8 +284,8 @@ void UDPExchange::send() ...@@ -284,8 +284,8 @@ void UDPExchange::send()
// receive // receive
if( udp->isOutputReady(sendTimeout) ) if( udp->isOutputReady(sendTimeout) )
{ {
int ret = udp->transmit((char*)(&h),sizeof(h)); ssize_t ret = udp->transmit((char*)(&h),sizeof(h));
if( ret<sizeof(h) ) if( ret<(ssize_t)sizeof(h) )
{ {
cerr << myname << "(send data header): ret=" << ret << " sizeof=" << sizeof(h) << endl; cerr << myname << "(send data header): ret=" << ret << " sizeof=" << sizeof(h) << endl;
return; return;
...@@ -296,8 +296,8 @@ void UDPExchange::send() ...@@ -296,8 +296,8 @@ void UDPExchange::send()
for( ; it!=mypack.dlist.end(); ++it ) for( ; it!=mypack.dlist.end(); ++it )
{ {
cout << myname << "(send): " << (*it) << endl; cout << myname << "(send): " << (*it) << endl;
ret = udp->transmit((char*)(&(*it)),sizeof(*it)); ssize_t ret = udp->transmit((char*)(&(*it)),sizeof(*it));
if( ret<sizeof(*it) ) if( ret<(ssize_t)sizeof(*it) )
{ {
cerr << myname << "(send data): ret=" << ret << " sizeof=" << sizeof(*it) << endl; cerr << myname << "(send data): ret=" << ret << " sizeof=" << sizeof(*it) << endl;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment