From 2624a1617042dd0e5d30331d705e1a5e8a97fed0 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 23 Apr 2003 14:56:07 +0000 Subject: [PATCH] Fixed/suppressed HP-UX native (aCC) warnings --- src/ca/cac.cpp | 2 +- src/ca/tcpiiu.cpp | 30 +++++++++---------- src/ca/test_event.cpp | 4 +-- src/cas/generic/casStrmClient.cc | 2 +- src/libCom/osi/os/default/osdMessageQueue.cpp | 17 +++++++---- src/softIoc/softMain.cpp | 4 +-- 6 files changed, 32 insertions(+), 27 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index c2a905215..113a43aa0 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -508,7 +508,7 @@ void cac::repeaterSubscribeConfirmNotify () } bool cac::transferChanToVirtCircuit ( - epicsGuard < callbackMutex > & cbGuard, unsigned cid, unsigned sid, + epicsGuard < callbackMutex > & cbGuard, unsigned cid, unsigned sid, // X aCC 431 ca_uint16_t typeCode, arrayElementCount count, unsigned minorVersionNumber, const osiSockAddr & addr ) { diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index 9d04e29b9..f78872b5e 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -640,7 +640,7 @@ void tcpiiu::disconnectNotify ( epicsGuard < cacMutex > & ) this->sendThreadFlushEvent.signal (); } -void tcpiiu::initiateAbortShutdown ( epicsGuard < callbackMutex > & cbGuard, +void tcpiiu::initiateAbortShutdown ( epicsGuard < callbackMutex > & cbGuard, // X aCC 431 epicsGuard < cacMutex > & guard ) { if ( ! this->discardingPendingData ) { @@ -663,7 +663,7 @@ void tcpiiu::initiateAbortShutdown ( epicsGuard < callbackMutex > & cbGuard, this->shutdown ( guard ); } -void tcpiiu::shutdown ( epicsGuard & guard ) +void tcpiiu::shutdown ( epicsGuard & guard ) // X aCC 431 { iiu_conn_state oldState = this->state; if ( oldState != iiucs_abort_shutdown ) { @@ -897,7 +897,7 @@ bool tcpiiu::processIncoming ( /* * tcpiiu::hostNameSetRequest () */ -void tcpiiu::hostNameSetRequest ( epicsGuard < cacMutex > & locker ) +void tcpiiu::hostNameSetRequest ( epicsGuard < cacMutex > & locker ) // X aCC 431 { if ( ! CA_V41 ( this->minorProtocolVersion ) ) { return; @@ -927,7 +927,7 @@ void tcpiiu::hostNameSetRequest ( epicsGuard < cacMutex > & locker ) /* * tcpiiu::userNameSetRequest () */ -void tcpiiu::userNameSetRequest ( epicsGuard < cacMutex > & locker ) +void tcpiiu::userNameSetRequest ( epicsGuard < cacMutex > & locker ) // X aCC 431 { if ( ! CA_V41 ( this->minorProtocolVersion ) ) { return; @@ -952,7 +952,7 @@ void tcpiiu::userNameSetRequest ( epicsGuard < cacMutex > & locker ) minder.commit (); } -void tcpiiu::disableFlowControlRequest ( epicsGuard < cacMutex > & locker ) +void tcpiiu::disableFlowControlRequest ( epicsGuard < cacMutex > & locker ) // X aCC 431 { if ( this->sendQue.flushEarlyThreshold ( 16u ) ) { this->flushRequest (); @@ -965,7 +965,7 @@ void tcpiiu::disableFlowControlRequest ( epicsGuard < cacMutex > & locker ) minder.commit (); } -void tcpiiu::enableFlowControlRequest ( epicsGuard < cacMutex > & locker ) +void tcpiiu::enableFlowControlRequest ( epicsGuard < cacMutex > & locker ) // X aCC 431 { if ( this->sendQue.flushEarlyThreshold ( 16u ) ) { this->flushRequest (); @@ -978,7 +978,7 @@ void tcpiiu::enableFlowControlRequest ( epicsGuard < cacMutex > & locker ) minder.commit (); } -void tcpiiu::versionMessage ( epicsGuard < cacMutex > & locker, +void tcpiiu::versionMessage ( epicsGuard < cacMutex > & locker, // X aCC 431 const cacChannel::priLev & priority ) { assert ( priority <= 0xffff ); @@ -995,7 +995,7 @@ void tcpiiu::versionMessage ( epicsGuard < cacMutex > & locker, minder.commit (); } -void tcpiiu::echoRequest ( epicsGuard < cacMutex > & locker ) +void tcpiiu::echoRequest ( epicsGuard < cacMutex > & locker ) // X aCC 431 { if ( this->sendQue.flushEarlyThreshold ( 16u ) ) { this->flushRequest (); @@ -1008,7 +1008,7 @@ void tcpiiu::echoRequest ( epicsGuard < cacMutex > & locker ) minder.commit (); } -void tcpiiu::writeRequest ( epicsGuard < cacMutex > & guard, +void tcpiiu::writeRequest ( epicsGuard < cacMutex > & guard, // X aCC 431 nciu &chan, unsigned type, unsigned nElem, const void *pValue ) { if ( ! chan.connected () ) { @@ -1022,7 +1022,7 @@ void tcpiiu::writeRequest ( epicsGuard < cacMutex > & guard, } -void tcpiiu::writeNotifyRequest ( epicsGuard < cacMutex > & guard, +void tcpiiu::writeNotifyRequest ( epicsGuard < cacMutex > & guard, // X aCC 431 nciu &chan, netWriteNotifyIO &io, unsigned type, unsigned nElem, const void *pValue ) { @@ -1039,7 +1039,7 @@ void tcpiiu::writeNotifyRequest ( epicsGuard < cacMutex > & guard, minder.commit (); } -void tcpiiu::readNotifyRequest ( epicsGuard < cacMutex > & locker, +void tcpiiu::readNotifyRequest ( epicsGuard < cacMutex > & locker, // X aCC 431 nciu & chan, netReadNotifyIO & io, unsigned dataType, unsigned nElem ) { @@ -1073,7 +1073,7 @@ void tcpiiu::readNotifyRequest ( epicsGuard < cacMutex > & locker, } void tcpiiu::createChannelRequest ( - nciu & chan, epicsGuard < cacMutex > & guard ) + nciu & chan, epicsGuard < cacMutex > & guard ) // X aCC 431 { const char *pName; unsigned nameLength; @@ -1114,7 +1114,7 @@ void tcpiiu::createChannelRequest ( minder.commit (); } -void tcpiiu::clearChannelRequest ( epicsGuard < cacMutex > & locker, +void tcpiiu::clearChannelRequest ( epicsGuard < cacMutex > & locker, // X aCC 431 ca_uint32_t sid, ca_uint32_t cid ) { comQueSendMsgMinder minder ( this->sendQue, locker ); @@ -1129,7 +1129,7 @@ void tcpiiu::clearChannelRequest ( epicsGuard < cacMutex > & locker, // this routine return void because if this internally fails the best response // is to try again the next time that we reconnect // -void tcpiiu::subscriptionRequest ( epicsGuard < cacMutex > & locker, +void tcpiiu::subscriptionRequest ( epicsGuard < cacMutex > & locker, // X aCC 431 nciu &chan, netSubscription & subscr ) { if ( ! chan.connected() ) { @@ -1169,7 +1169,7 @@ void tcpiiu::subscriptionRequest ( epicsGuard < cacMutex > & locker, minder.commit (); } -void tcpiiu::subscriptionCancelRequest ( epicsGuard < cacMutex > & locker, +void tcpiiu::subscriptionCancelRequest ( epicsGuard < cacMutex > & locker, // X aCC 431 nciu & chan, netSubscription & subscr ) { comQueSendMsgMinder minder ( this->sendQue, locker ); diff --git a/src/ca/test_event.cpp b/src/ca/test_event.cpp index f198db14e..974fe82b5 100644 --- a/src/ca/test_event.cpp +++ b/src/ca/test_event.cpp @@ -76,7 +76,7 @@ extern "C" void epicsShareAPI ca_dump_dbr ( dbr_short_t *pvalue = (dbr_short_t *)pbuffer; for (i = 0; i < count; i++,pvalue++){ if(count!=1 && (i%10 == 0)) printf("\n"); - printf("%d ",*(short *)pvalue); + printf("%d ",* (short *)pvalue); // X aCC 392 } break; } @@ -94,7 +94,7 @@ extern "C" void epicsShareAPI ca_dump_dbr ( dbr_float_t *pvalue = (dbr_float_t *)pbuffer; for (i = 0; i < count; i++,pvalue++){ if(count!=1 && (i%10 == 0)) printf("\n"); - printf("%6.4f ",*(float *)pvalue); + printf("%6.4f ",*(float *)pvalue); // X aCC 392 } break; } diff --git a/src/cas/generic/casStrmClient.cc b/src/cas/generic/casStrmClient.cc index 281dbe6ee..467ec4be8 100644 --- a/src/cas/generic/casStrmClient.cc +++ b/src/cas/generic/casStrmClient.cc @@ -1432,7 +1432,7 @@ caStatus casStrmClient::enumPostponedCreateChanResponse ( assert ( nativeCount <= 0xffffffff ); status = this->out.copyInHeader ( CA_PROTO_CREATE_CHAN, 0, static_cast ( nativeTypeDBR ), - static_cast ( nativeCount ), + static_cast ( nativeCount ), // X aCC 392 hdr.m_cid, chan.getSID(), 0 ); if ( status != S_cas_success ) { diff --git a/src/libCom/osi/os/default/osdMessageQueue.cpp b/src/libCom/osi/os/default/osdMessageQueue.cpp index 6652df45b..582b26078 100644 --- a/src/libCom/osi/os/default/osdMessageQueue.cpp +++ b/src/libCom/osi/os/default/osdMessageQueue.cpp @@ -96,7 +96,8 @@ epicsMessageQueueDestroy(epicsMessageQueueId pmsg) { struct eventNode *evp; - while ((evp = (struct eventNode *)ellGet(&pmsg->eventFreeList)) != NULL) { + while ((evp = reinterpret_cast < struct eventNode * > + ( ellGet(&pmsg->eventFreeList) ) ) != NULL) { epicsEventDestroy(evp->event); free(evp); } @@ -110,9 +111,10 @@ getEventNode(epicsMessageQueueId pmsg) { struct eventNode *evp; - evp = (struct eventNode *)ellGet(&pmsg->eventFreeList); + evp = reinterpret_cast < struct eventNode * > ( ellGet(&pmsg->eventFreeList) ); if (evp == NULL) { - evp = (struct eventNode *)callocMustSucceed(1, sizeof(*evp), "epicsMessageQueueGetEventNode"); + evp = (struct eventNode *) callocMustSucceed(1, sizeof(*evp), + "epicsMessageQueueGetEventNode"); evp->event = epicsEventMustCreate(epicsEventEmpty); } return evp; @@ -168,7 +170,8 @@ mySend(epicsMessageQueueId pmsg, void *message, unsigned int size, bool wait, bo /* * Copy message to waiting receiver */ - if ((pthr = (struct threadNode *)ellGet(&pmsg->receiveQueue)) != NULL) { + if ((pthr = reinterpret_cast < struct threadNode * > + ( ellGet(&pmsg->receiveQueue) ) ) != NULL) { memcpy(pthr->buf, message, size); pthr->size = size; pthr->eventSent = true; @@ -236,7 +239,8 @@ myReceive(epicsMessageQueueId pmsg, void *message, bool wait, bool haveTimeout, /* * Wake up the oldest task waiting to send */ - if ((pthr = (struct threadNode *)ellGet(&pmsg->sendQueue)) != NULL) { + if ((pthr = reinterpret_cast < struct threadNode * > + ( ellGet(&pmsg->sendQueue) ) ) != NULL) { pthr->eventSent = true; epicsEventSignal(pthr->evp->event); } @@ -255,7 +259,8 @@ myReceive(epicsMessageQueueId pmsg, void *message, bool wait, bool haveTimeout, /* * Wake up the oldest task waiting to send */ - if ((pthr = (struct threadNode *)ellGet(&pmsg->sendQueue)) != NULL) { + if ((pthr = reinterpret_cast < struct threadNode * > + ( ellGet(&pmsg->sendQueue) ) ) != NULL) { pthr->eventSent = true; epicsEventSignal(pthr->evp->event); } diff --git a/src/softIoc/softMain.cpp b/src/softIoc/softMain.cpp index cdef10575..22874c83e 100644 --- a/src/softIoc/softMain.cpp +++ b/src/softIoc/softMain.cpp @@ -118,8 +118,8 @@ int main(int argc, char *argv[]) } registerRecordDeviceDriver(pdbbase); - registryFunctionAdd("exit", (REGISTRYFUNCTION) exitSubroutine); - + registryFunctionAdd("exit", (REGISTRYFUNCTION) exitSubroutine); // X aCC 331 + while (argc>1 && **argv == '-') { switch ((*argv)[1]) { case 'a':