fixed gnu warnings

This commit is contained in:
Jeff Hill
2002-09-24 17:07:43 +00:00
parent bad7bd373e
commit 4a0334796c
2 changed files with 5 additions and 3 deletions

View File

@@ -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;
}