From 6fbf031e75350c2c8bb29a21791eab66328010a4 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 23 May 2001 01:23:23 +0000 Subject: [PATCH] fixed sun pro warnings --- src/ca/cac.cpp | 10 +++++----- src/ca/comQueRecv.cpp | 10 +++++----- src/ca/getCopy.cpp | 2 +- src/ca/nciu.h | 4 ++-- src/ca/netSubscription.cpp | 4 ++-- src/ca/tcpRecvWatchdog.cpp | 2 +- src/ca/virtualCircuit.h | 2 +- src/rsrv/caserverio.c | 7 +++---- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index fba577308..36c755494 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -1369,7 +1369,7 @@ bool cac::clearChannelRespAction ( tcpiiu &, const caHdrLargeArray &, void * /* return true; // currently a noop } -bool cac::defaultExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, +bool cac::defaultExcep ( tcpiiu &iiu, const caHdrLargeArray &, const char *pCtx, unsigned status ) { char buf[512]; @@ -1388,7 +1388,7 @@ bool cac::eventAddExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, return true; } -bool cac::readExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, +bool cac::readExcep ( tcpiiu &, const caHdrLargeArray &hdr, const char *pCtx, unsigned status ) { this->ioExceptionNotifyAndDestroy ( hdr.m_available, @@ -1396,7 +1396,7 @@ bool cac::readExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, return true; } -bool cac::writeExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, +bool cac::writeExcep ( tcpiiu &, const caHdrLargeArray &hdr, const char *pCtx, unsigned status ) { nciu * pChan = this->chanTable.lookup ( hdr.m_available ); @@ -1407,7 +1407,7 @@ bool cac::writeExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, return true; } -bool cac::readNotifyExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, +bool cac::readNotifyExcep ( tcpiiu &, const caHdrLargeArray &hdr, const char *pCtx, unsigned status ) { this->ioExceptionNotifyAndDestroy ( hdr.m_available, @@ -1415,7 +1415,7 @@ bool cac::readNotifyExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, return true; } -bool cac::writeNotifyExcep ( tcpiiu &iiu, const caHdrLargeArray &hdr, +bool cac::writeNotifyExcep ( tcpiiu &, const caHdrLargeArray &hdr, const char *pCtx, unsigned status ) { this->ioExceptionNotifyAndDestroy ( hdr.m_available, diff --git a/src/ca/comQueRecv.cpp b/src/ca/comQueRecv.cpp index 1facb1b0c..28e658944 100644 --- a/src/ca/comQueRecv.cpp +++ b/src/ca/comQueRecv.cpp @@ -88,18 +88,18 @@ unsigned comQueRecv::removeBytes ( unsigned nBytes ) if ( ! pComBuf ) { return totalBytes; } - unsigned nBytes = pComBuf->removeBytes ( bytesLeft ); + unsigned nBytesThisTime = pComBuf->removeBytes ( bytesLeft ); if ( pComBuf->occupiedBytes () == 0u ) { this->bufs.remove ( *pComBuf ); pComBuf->destroy (); } - if ( nBytes == 0u) { - return totalBytes; + if ( nBytesThisTime == 0u) { + break; } - totalBytes += nBytes; + totalBytes += nBytesThisTime; bytesLeft = nBytes - totalBytes; } - return nBytes; + return totalBytes; } void comQueRecv::pushLastComBufReceived ( comBuf & bufIn ) diff --git a/src/ca/getCopy.cpp b/src/ca/getCopy.cpp index 49573ecfb..0b317974f 100644 --- a/src/ca/getCopy.cpp +++ b/src/ca/getCopy.cpp @@ -52,7 +52,7 @@ void getCopy::completion ( unsigned typeIn, } void getCopy::exception ( - int status, const char *pContext, unsigned typeIn, arrayElementCount countIn ) + int status, const char *pContext, unsigned /* typeIn */, arrayElementCount /* countIn */ ) { this->cacCtx.exception ( status, pContext, __FILE__, __LINE__, this->chan, this->type, this->count, CA_OP_GET ); diff --git a/src/ca/nciu.h b/src/ca/nciu.h index 559672572..bb4315b86 100644 --- a/src/ca/nciu.h +++ b/src/ca/nciu.h @@ -197,9 +197,9 @@ inline void nciu::connectTimeoutNotify () } inline void nciu::writeException ( int status, - const char *pContext, unsigned type, arrayElementCount count ) + const char *pContext, unsigned typeIn, arrayElementCount countIn ) { - this->notify().writeException ( status, pContext, type, count ); + this->notify().writeException ( status, pContext, typeIn, countIn ); } #endif // ifdef nciuh diff --git a/src/ca/netSubscription.cpp b/src/ca/netSubscription.cpp index 450276d8e..c5d39c780 100644 --- a/src/ca/netSubscription.cpp +++ b/src/ca/netSubscription.cpp @@ -72,9 +72,9 @@ void netSubscription::exception ( int status, const char *pContext ) } void netSubscription::exception ( int status, const char *pContext, - unsigned type, arrayElementCount count ) + unsigned typeIn, arrayElementCount countIn ) { - this->notify.exception ( status, pContext, type, count ); + this->notify.exception ( status, pContext, typeIn, countIn ); } void netSubscription::completion ( unsigned typeIn, diff --git a/src/ca/tcpRecvWatchdog.cpp b/src/ca/tcpRecvWatchdog.cpp index 31a28b2b7..0f5962c78 100644 --- a/src/ca/tcpRecvWatchdog.cpp +++ b/src/ca/tcpRecvWatchdog.cpp @@ -31,7 +31,7 @@ tcpRecvWatchdog::~tcpRecvWatchdog () delete & this->timer; } -epicsTimerNotify::expireStatus tcpRecvWatchdog::expire ( const epicsTime & currentTime ) +epicsTimerNotify::expireStatus tcpRecvWatchdog::expire ( const epicsTime & /* currentTime */ ) { if ( this->responsePending ) { this->cancel (); diff --git a/src/ca/virtualCircuit.h b/src/ca/virtualCircuit.h index 2dbddf289..36981bfa8 100644 --- a/src/ca/virtualCircuit.h +++ b/src/ca/virtualCircuit.h @@ -78,7 +78,7 @@ private: nCopied = 0u; } while ( nElem > nCopied ) { - comBuf *pComBuf = new ( std::nothrow ) comBuf; + pComBuf = new ( std::nothrow ) comBuf; if ( ! pComBuf ) { this->wire.forcedShutdown (); throw std::bad_alloc (); diff --git a/src/rsrv/caserverio.c b/src/rsrv/caserverio.c index 291ba11ca..31efe0f14 100644 --- a/src/rsrv/caserverio.c +++ b/src/rsrv/caserverio.c @@ -251,16 +251,15 @@ ca_uint16_t rsrvGetUInt16 ( struct message_buffer *recv ) * this assumes that we have already checked to see * if sufficent bytes are available */ -ca_uint16_t rsrvGetUInt32 ( struct message_buffer *recv ) +ca_uint32_t rsrvGetUInt32 ( struct message_buffer *recv ) { - ca_uint16_t tmp; + ca_uint32_t tmp; /* * this assumes that we have already checked to see * if sufficent bytes are available */ assert ( recv->cnt - recv->stk >= 4u ); - tmp = recv->buf[recv->stk++]; - tmp <<= 24u; + tmp = recv->buf[recv->stk++] <<= 24u; tmp |= recv->buf[recv->stk++] << 16u; tmp |= recv->buf[recv->stk++] << 8u; tmp |= recv->buf[recv->stk++];