diff --git a/src/ca/acctst.c b/src/ca/acctst.c index d354b56d0..4ff5a3eb0 100644 --- a/src/ca/acctst.c +++ b/src/ca/acctst.c @@ -912,7 +912,7 @@ void verifyShortIO ( chid chan ) status = ca_pend_io ( 10.0 ); SEVCHK ( status, "control short pend failed\n" ); - incr = ( cl.upper_ctrl_limit - cl.lower_ctrl_limit ); + incr = (dbr_short_t) ( cl.upper_ctrl_limit - cl.lower_ctrl_limit ); if ( incr >= 1 ) { showProgressBegin (); @@ -920,8 +920,8 @@ void verifyShortIO ( chid chan ) if ( incr == 0 ) { incr = 1; } - for ( iter = cl.lower_ctrl_limit; - iter <= cl.upper_ctrl_limit; iter+=incr ) { + for ( iter = (dbr_short_t) cl.lower_ctrl_limit; + iter <= (dbr_short_t) cl.upper_ctrl_limit; iter += incr ) { status = ca_put ( DBR_SHORT, chan, &iter ); status = ca_get ( DBR_SHORT, chan, &rdbk ); @@ -1375,7 +1375,7 @@ void caTaskExistTest () void verifyDataTypeMacros () { - short type; + int type; type = dbf_type_to_DBR ( DBF_SHORT ); assert ( type == DBR_SHORT ); diff --git a/src/ca/baseNMIU.cpp b/src/ca/baseNMIU.cpp index 436884d30..a82cae541 100644 --- a/src/ca/baseNMIU.cpp +++ b/src/ca/baseNMIU.cpp @@ -35,7 +35,7 @@ class netSubscription * baseNMIU::isSubscription () void baseNMIU::show ( unsigned /* level */ ) const { printf ( "CA IO primitive at %p for channel %s\n", - this, this->chan.pName () ); + static_cast ( this ), this->chan.pName () ); } diff --git a/src/ca/bhe.cpp b/src/ca/bhe.cpp index 13c0ad58d..54cd5891a 100644 --- a/src/ca/bhe.cpp +++ b/src/ca/bhe.cpp @@ -157,9 +157,11 @@ bool bhe::updatePeriod ( epicsTime programBeginTime ) void bhe::show ( unsigned level ) const { - printf ( "CA beacon hash entry at %p with average period %f\n", this, this->averagePeriod ); + printf ( "CA beacon hash entry at %p with average period %f\n", + static_cast ( this ), this->averagePeriod ); if ( level > 0u ) { - printf ( "network IO pointer %p\n", this->piiu ); + printf ( "network IO pointer %p\n", + static_cast ( this->piiu ) ); } } diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index c289bc434..74112cc9f 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -293,7 +293,7 @@ void cac::show ( unsigned level ) const epicsAutoMutex autoMutex2 ( this->defaultMutex ); ::printf ( "Channel Access Client Context at %p for user %s\n", - this, this->pUserName ); + static_cast ( this ), this->pUserName ); if ( level > 0u ) { tsDLIterConstBD < tcpiiu > piiu = this->iiuList.firstIter (); while ( piiu.valid () ) { @@ -313,11 +313,13 @@ void cac::show ( unsigned level ) const this->pudpiiu->show ( level - 2u ); } ::printf ( "\texception function %p, exception arg %p\n", - this->ca_exception_func, this->ca_exception_arg ); + static_cast ( this->ca_exception_func ), + static_cast ( this->ca_exception_arg ) ); ::printf ( "\tCA printf function %p\n", - this->pVPrintfFunc); + static_cast ( this->pVPrintfFunc ) ); ::printf ( "\tfile descriptor registration function %p, file descriptor registration arg %p\n", - this->fdRegFunc, this->fdRegArg ); + static_cast ( this->fdRegFunc ), + static_cast ( this->fdRegArg ) ); this->showOutstandingIO ( level - 2u ); } diff --git a/src/ca/ioCounter.cpp b/src/ca/ioCounter.cpp index 306673838..6e1ba18a9 100644 --- a/src/ca/ioCounter.cpp +++ b/src/ca/ioCounter.cpp @@ -71,7 +71,8 @@ void ioCounter::decrementOutstandingIO ( unsigned seqNumber ) void ioCounter::showOutstandingIO ( unsigned level ) const { - printf ( "ioCounter at %p\n", this ); + printf ( "ioCounter at %p\n", + static_cast ( this ) ); printf ( "\tthere are %u unsatisfied IO operations blocking ca_pend_io()\n", this->pndrecvcnt ); if ( level > 0u ) { diff --git a/src/ca/nciu.cpp b/src/ca/nciu.cpp index edcb92489..3c353c72f 100644 --- a/src/ca/nciu.cpp +++ b/src/ca/nciu.cpp @@ -11,7 +11,7 @@ * * Notes: * 1) This class has a pointer to the IIU. This pointer always points at - * a valid IIU. If the client is deleted then the channel points at a + * a valid IIU. If the client context is deleted then the channel points at a * static file scope IIU. IIU's that disconnect go into an inactive state * and are stored on a list for later reuse. When the channel calls a * member function of the IIU, the IIU verifies that the channel's IIU diff --git a/src/ca/netReadCopyIO.cpp b/src/ca/netReadCopyIO.cpp index 3232f8fb8..02ccbc922 100644 --- a/src/ca/netReadCopyIO.cpp +++ b/src/ca/netReadCopyIO.cpp @@ -76,7 +76,7 @@ void netReadCopyIO::show ( unsigned level ) const { int tmpType = static_cast ( this->type ); printf ( "read copy IO at %p, type %s, element count %lu\n", - this, dbf_type_to_text ( tmpType ), this->count ); + static_cast ( this ), dbf_type_to_text ( tmpType ), this->count ); if ( level > 0u ) { printf ( "\tsequence number %u, user's storage %p\n", this->seqNumber, this->pValue ); diff --git a/src/ca/netReadNotifyIO.cpp b/src/ca/netReadNotifyIO.cpp index bc75addae..f4d077976 100644 --- a/src/ca/netReadNotifyIO.cpp +++ b/src/ca/netReadNotifyIO.cpp @@ -58,7 +58,8 @@ cacChannelIO & netReadNotifyIO::channelIO () const void netReadNotifyIO::show ( unsigned level ) const { - printf ( "read notify IO at %p\n", this ); + printf ( "read notify IO at %p\n", + static_cast ( this ) ); if ( level > 0u ) { this->baseNMIU::show ( level - 1u ); } diff --git a/src/ca/netWriteNotifyIO.cpp b/src/ca/netWriteNotifyIO.cpp index d84f141f0..047e92715 100644 --- a/src/ca/netWriteNotifyIO.cpp +++ b/src/ca/netWriteNotifyIO.cpp @@ -62,7 +62,8 @@ cacChannelIO & netWriteNotifyIO::channelIO () const void netWriteNotifyIO::show ( unsigned level ) const { - printf ( "read write notify IO at %p\n", this ); + printf ( "read write notify IO at %p\n", + static_cast ( this ) ); if ( level > 0u ) { this->baseNMIU::show ( level - 1u ); } diff --git a/src/ca/netiiu.cpp b/src/ca/netiiu.cpp index 1111e2556..672d8fd95 100644 --- a/src/ca/netiiu.cpp +++ b/src/ca/netiiu.cpp @@ -39,7 +39,8 @@ void netiiu::show ( unsigned level ) const } } if ( level > 2u ) { - printf ( "\tcac pointer %p\n", this->pClientCtx ); + printf ( "\tcac pointer %p\n", + static_cast ( this->pClientCtx ) ); this->mutex.show ( level - 2u ); } } diff --git a/src/ca/recvProcessThread.cpp b/src/ca/recvProcessThread.cpp index 14c062836..e67fd8583 100644 --- a/src/ca/recvProcessThread.cpp +++ b/src/ca/recvProcessThread.cpp @@ -136,7 +136,7 @@ void recvProcessThread::show ( unsigned level ) const { epicsAutoMutex autoMutex ( this->mutex ); printf ( "CA receive processing thread at %p state=%s\n", - this, this->processing ? "busy" : "idle"); + static_cast ( this ), this->processing ? "busy" : "idle"); if ( level > 0u ) { printf ( "enable count %u\n", this->enableRefCount ); printf ( "blocking for completion count %u\n", this->blockingForCompletion ); diff --git a/src/ca/repeater.cpp b/src/ca/repeater.cpp index 30b667b79..69e682ecf 100644 --- a/src/ca/repeater.cpp +++ b/src/ca/repeater.cpp @@ -425,7 +425,7 @@ LOCAL void register_new_client ( osiSockAddr &from ) pNewClient = pclient.pointer (); } else { - repeaterClient *pNewClient = new repeaterClient ( from ); + pNewClient = new repeaterClient ( from ); if ( ! pNewClient ) { ca_printf ( "%s: no memory for new client\n", __FILE__ ); return; diff --git a/src/ca/syncGroupNotify.cpp b/src/ca/syncGroupNotify.cpp index b4fffea97..dc914a1f5 100644 --- a/src/ca/syncGroupNotify.cpp +++ b/src/ca/syncGroupNotify.cpp @@ -114,7 +114,8 @@ void syncGroupNotify::completionNotify ( cacChannelIO &, void syncGroupNotify::show ( unsigned /* level */ ) const { printf ( "pending sg op: pVal=%p, magic=%u seqNo=%lu sg=%p\n", - this->pValue, this->magic, this->seqNo, &this->sg); + this->pValue, this->magic, this->seqNo, + static_cast ( &this->sg ) ); } void syncGroupNotify::exceptionNotify ( cacChannelIO &io, diff --git a/src/ca/tcpRecvWatchdog.cpp b/src/ca/tcpRecvWatchdog.cpp index c5cc365cb..b6099e9cf 100644 --- a/src/ca/tcpRecvWatchdog.cpp +++ b/src/ca/tcpRecvWatchdog.cpp @@ -118,7 +118,7 @@ void tcpRecvWatchdog::cancel () void tcpRecvWatchdog::show ( unsigned level ) const { printf ( "Receive virtual circuit watchdog at %p, period %f\n", - this, this->period ); + static_cast ( this ), this->period ); if ( level > 0u ) { printf ( "\tresponse pending boolean %u, beacon anomaly boolean %u\n", this->responsePending, this->beaconAnomaly ); diff --git a/src/libCom/bucketLib/bucketLib.c b/src/libCom/bucketLib/bucketLib.c index 76cdf69f8..f2781bd3e 100644 --- a/src/libCom/bucketLib/bucketLib.c +++ b/src/libCom/bucketLib/bucketLib.c @@ -341,12 +341,18 @@ epicsShareFunc BUCKET * epicsShareAPI bucketCreate (unsigned nHashTableEntries) /* * count the number of bits in the bucket id */ - for (nbits=0; nbits 0 ) { + for (nbits=0; nbits