quiet some warnings

This commit is contained in:
Michael Davidsaver
2019-11-12 18:15:32 -08:00
parent 7acd7c6145
commit 905ca4b7ac
5 changed files with 6 additions and 9 deletions

View File

@@ -1162,7 +1162,7 @@ void udpiiu :: show ( unsigned level ) const
}
}
if ( level > 2u ) {
::printf ("\tsocket identifier %d\n", this->sock );
::printf ("\tsocket identifier %d\n", int(this->sock) );
::printf ("\tbytes in xmit buffer %u\n", this->nBytesInXmitBuf );
::printf ("\tshut down command bool %u\n", this->shutdownCmd );
::printf ( "\trecv thread exit signal:\n" );
@@ -1195,10 +1195,7 @@ bool udpiiu::wakeupMsg ()
// send a wakeup msg so the UDP recv thread will exit
int status = sendto ( this->sock, reinterpret_cast < char * > ( &msg ),
sizeof (msg), 0, &addr.sa, sizeof ( addr.sa ) );
if ( status == sizeof (msg) ) {
return true;
}
return false;
return status == sizeof (msg);
}
void udpiiu::beaconAnomalyNotify (

View File

@@ -56,7 +56,7 @@ void cas_send_bs_msg ( struct client *pclient, int lock_needed )
if ( pclient->disconnect ) {
if ( CASDEBUG > 2 ) {
errlogPrintf ( "CAS: msg Discard for sock %d addr %x\n",
pclient->sock, (unsigned) pclient->addr.sin_addr.s_addr );
(int)pclient->sock, (unsigned) pclient->addr.sin_addr.s_addr );
}
pclient->send.stk = 0u;
if(lock_needed)

View File

@@ -335,7 +335,7 @@ void rsrv_build_addr_lists(void)
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
errlogPrintf("rsrv: failed to set mcast ttl %d\n", ttl);
errlogPrintf("rsrv: failed to set mcast ttl %d\n", (int)ttl);
}
}
#endif

View File

@@ -192,7 +192,7 @@ void errSymLookup(long status, char * pBuf, size_t bufLength)
{
const char* msg = errSymLookupInternal(status);
if(msg) {
strncpy(pBuf, msg, bufLength);
strncpy(pBuf, msg, bufLength-1);
pBuf[bufLength-1] = '\0';
return;
}

View File

@@ -249,7 +249,7 @@ void fdRegId::show ( unsigned level ) const
static_cast <const void *> ( this ) );
if ( level > 1u ) {
printf ( "\tfd = %d, type = %d\n",
this->fd, this->type );
int(this->fd), this->type );
}
}