From 6b1be2ea5c382949f62d3ea75d2bba1bf3ec0ea0 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 18 Feb 1998 22:46:47 +0000 Subject: [PATCH] fixed warning --- src/cas/generic/caServerI.cc | 72 ++++++++++++++++----------------- src/cas/generic/casEventSysIL.h | 9 +++-- src/cas/generic/server.h | 9 +++-- 3 files changed, 44 insertions(+), 46 deletions(-) diff --git a/src/cas/generic/caServerI.cc b/src/cas/generic/caServerI.cc index 1a335cb20..9532728d4 100644 --- a/src/cas/generic/caServerI.cc +++ b/src/cas/generic/caServerI.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.9 1997/08/05 00:46:57 jhill + * fixed warnings + * * Revision 1.8 1997/06/13 09:15:51 jhill * connect proto changes * @@ -136,79 +139,72 @@ void caServerI::show (unsigned level) const // caServerI::caServerI() // caServerI::caServerI (caServer &tool, unsigned nPV) : - caServerOS(*this), - casEventRegistry(* (osiMutex *) this), - dgClient(*this), + caServerOS (*this), + casEventRegistry (* (osiMutex *) this), + dgClient (*this), // // Set up periodic beacon interval // (exponential back off to a plateau // from this intial period) // - beaconPeriod(CAServerMinBeaconPeriod), - adapter(tool), - debugLevel(0u), - pvCountEstimate(nPV<100u?100u:nPV), - haveBeenInitialized(FALSE) + beaconPeriod (CAServerMinBeaconPeriod), + adapter (tool), + debugLevel (0u), + pvCountEstimate (nPV<100u?100u:nPV), + haveBeenInitialized (FALSE) { caStatus status; - - assert(&adapter); - //ctx.setServer(this); - - status = this->init(); - if (status) { - errMessage(status, "CA server internals init"); - } -} - - -// -// caServerI::init() -// -caStatus caServerI::init() -{ - int status; int resLibStatus; - if (this->osiMutex::init()) { - return S_cas_noMemory; + assert (&adapter); + + if (this->osiMutex::init ()) { + errMessage (S_cas_noMemory, "CA server mutex init"); + return; } - status = casEventRegistry::init(); + status = casEventRegistry::init (); if (status) { - return status; + errMessage (status, "CA server event registry init"); + return; } - status = caServerIO::init(*this); + status = caServerIO::init (*this); if (status) { - return status; + errMessage (status, "CA server IO internals init"); + return; } if (this->intfList.count()==0u) { - return S_cas_noInterface; + errMessage (S_cas_noInterface, "CA server internals init"); + return; } status = caServerOS::init(); if (status) { - return status; + errMessage (status, "CA server OS dependent init"); + return; } status = this->dgClient.init(); if (status) { - return status; + errMessage (status, "CA server DG init"); + return; } // // hash table size may need adjustment here? // - resLibStatus = this->uintResTable::init(this->pvCountEstimate*2u); + resLibStatus = this->uintResTable::init + (this->pvCountEstimate*2u); if (resLibStatus) { - ca_printf("CAS: integer resource id table init failed\n"); - return S_cas_noMemory; + errMessage (S_cas_noMemory, + "integer resource id table init failed"); + return; } this->haveBeenInitialized = TRUE; - return S_cas_success; + return; } diff --git a/src/cas/generic/casEventSysIL.h b/src/cas/generic/casEventSysIL.h index d51a8c64f..8aae98b05 100644 --- a/src/cas/generic/casEventSysIL.h +++ b/src/cas/generic/casEventSysIL.h @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.5 1997/08/05 00:47:09 jhill + * fixed warnings + * * Revision 1.4 1997/04/10 19:34:09 jhill * API changes * @@ -70,10 +73,8 @@ inline casEventSys::casEventSys (casCoreClient &coreClientIn) : // inline caStatus casEventSys::init() { - if (this->mutex.init()) { - return S_cas_noMemory; - } - return S_cas_success; + return (this->mutex.init() ? + S_cas_noMemory : S_cas_success); } // diff --git a/src/cas/generic/server.h b/src/cas/generic/server.h index 027db961d..14595feb3 100644 --- a/src/cas/generic/server.h +++ b/src/cas/generic/server.h @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.20 1998/02/05 23:05:27 jhill + * removed static members + * * Revision 1.19 1997/08/05 00:47:16 jhill * fixed warnings * @@ -167,7 +170,6 @@ typedef caResId caEventId; // class caServerI; - // // casEventSys // @@ -863,9 +865,8 @@ class caServerI : private uintResTable, public casEventRegistry { public: - caServerI(caServer &tool, unsigned pvCountEstimate); - caStatus init(); //constructor does not return status - ~caServerI(); + caServerI (caServer &tool, unsigned pvCountEstimate); + ~caServerI (); // // find the channel associated with a resource id