diff --git a/src/cas/generic/casClient.cc b/src/cas/generic/casClient.cc index d3efc8b6d..8c91702b2 100644 --- a/src/cas/generic/casClient.cc +++ b/src/cas/generic/casClient.cc @@ -542,7 +542,7 @@ caStatus casClient::sendErrWithEpicsStatus ( const caHdrLargeArray * pMsg, */ caStatus casClient::logBadIdWithFileAndLineno ( const caHdrLargeArray * mp, const void * dp, const int cacStatus, const char * pFileName, - const unsigned lineno, const unsigned id + const unsigned lineno, const unsigned idIn ) { int status; @@ -559,7 +559,7 @@ caStatus casClient::logBadIdWithFileAndLineno ( const caHdrLargeArray * mp, status = this->sendErr ( mp, cacStatus, "Bad Resource ID=%u detected at %s.%d", - id, pFileName, lineno); + idIn, pFileName, lineno); return status; } diff --git a/src/cas/generic/casStrmClient.cc b/src/cas/generic/casStrmClient.cc index 42656624c..7593ab82f 100644 --- a/src/cas/generic/casStrmClient.cc +++ b/src/cas/generic/casStrmClient.cc @@ -1899,7 +1899,7 @@ outBufClient::flushCondition casStrmClient::xSend ( char * pBufIn, bufSizeT nBytesNeedToBeSent, bufSizeT & nActualBytes ) { - outBufClient::flushCondition stat; + outBufClient::flushCondition stat = outBufClient::flushDisconnect; bufSizeT nActualBytesDelta; bufSizeT totalBytes; @@ -1916,10 +1916,11 @@ outBufClient::flushCondition casStrmClient::xSend ( char * pBufIn, // !! this time fetch may be slowing things down !! // //this->lastSendTS = epicsTime::getCurrent(); - return outBufClient::flushProgress; + stat = outBufClient::flushProgress; + break; } else { - return stat; + break; } } @@ -1931,10 +1932,11 @@ outBufClient::flushCondition casStrmClient::xSend ( char * pBufIn, // //this->lastSendTS = epicsTime::getCurrent(); nActualBytes = totalBytes; - return outBufClient::flushProgress; + stat = outBufClient::flushProgress; + break; } } - return outBufClient::flushDisconnect; // happy compiler + return stat; } // diff --git a/src/cas/io/bsdSocket/casDGIntfIO.cc b/src/cas/io/bsdSocket/casDGIntfIO.cc index 345f38a7b..df0a64eb9 100644 --- a/src/cas/io/bsdSocket/casDGIntfIO.cc +++ b/src/cas/io/bsdSocket/casDGIntfIO.cc @@ -402,20 +402,19 @@ void casDGIntfIO::sendBeaconIO ( char &msg, unsigned length, __FILE__, buf, SOCKERRSTR(SOCKERRNO)); } else { - osiSockAddr addr; - - osiSocklen_t size = ( osiSocklen_t ) sizeof (addr.sa); - status = getsockname (this->beaconSock, &addr.sa, &size); - if (status<0) { + osiSockAddr sockAddr; + osiSocklen_t size = ( osiSocklen_t ) sizeof ( sockAddr.sa ); + status = getsockname ( this->beaconSock, &sockAddr.sa, &size ); + if ( status < 0 ) { errlogPrintf ( "%s: CA beacon routing (getsockname) error was \"%s\"\n", __FILE__, SOCKERRSTR(SOCKERRNO)); } - else if (addr.sa.sa_family==AF_INET) { - addrField = addr.ia.sin_addr.s_addr; + else if ( sockAddr.sa.sa_family == AF_INET ) { + addrField = sockAddr.ia.sin_addr.s_addr; status = send ( this->beaconSock, &msg, length, 0 ); - if (status < 0) { - ipAddrToA (&pAddr->addr.ia, buf, sizeof(buf)); + if ( status < 0 ) { + ipAddrToA ( &pAddr->addr.ia, buf, sizeof(buf) ); errlogPrintf ( "%s: CA beacon (send to \"%s\") error was \"%s\"\n", __FILE__, buf, SOCKERRSTR(SOCKERRNO)); }