diff --git a/src/db/dbPutNotifyBlocker.cpp b/src/db/dbPutNotifyBlocker.cpp index 8d565ce61..d76b47faf 100644 --- a/src/db/dbPutNotifyBlocker.cpp +++ b/src/db/dbPutNotifyBlocker.cpp @@ -57,7 +57,8 @@ dbPutNotifyBlocker::~dbPutNotifyBlocker () { this->cancel (); if ( this->maxValueSize > sizeof ( this->dbrScalarValue ) ) { - delete [] this->pn.pbuffer; + char * pBuf = static_cast < char * > ( this->pn.pbuffer ); + delete [] pBuf; } } @@ -79,7 +80,8 @@ void dbPutNotifyBlocker::expandValueBuf ( unsigned long newSize ) { if ( this->maxValueSize < newSize ) { if ( this->maxValueSize > sizeof ( this->dbrScalarValue ) ) { - delete [] this->pn.pbuffer; + char * pBuf = static_cast < char * > ( this->pn.pbuffer ); + delete [] pBuf; this->maxValueSize = sizeof ( this->dbrScalarValue ); this->pn.pbuffer = & this->dbrScalarValue; } diff --git a/src/db/dbPutNotifyBlocker.h b/src/db/dbPutNotifyBlocker.h index c15f0b57b..ee4a73776 100644 --- a/src/db/dbPutNotifyBlocker.h +++ b/src/db/dbPutNotifyBlocker.h @@ -78,7 +78,7 @@ private: cacWriteNotify * pNotify; unsigned long maxValueSize; dbSubscriptionIO * isSubscription (); - void dbPutNotifyBlocker::expandValueBuf ( unsigned long newSize ); + void expandValueBuf ( unsigned long newSize ); static epicsSingleton < tsFreeList < dbPutNotifyBlocker > > pFreeList; friend void putNotifyCompletion ( putNotify *ppn ); dbPutNotifyBlocker ( const dbPutNotifyBlocker & );