From c900cedbc9cb92116f67926d30ad519c2f88bfa0 Mon Sep 17 00:00:00 2001 From: Jose Rubio Date: Fri, 11 Oct 2019 13:43:08 +0200 Subject: [PATCH] Fix to delete-incomplete warnings. --- cde/programs/dtmail/dtmail/ComposeCmds.C | 2 +- cde/programs/dtmail/dtmail/RoamApp.C | 2 +- cde/programs/dtmail/dtmail/RoamCmds.C | 2 +- cde/programs/dtmail/dtmail/RoamMenuWindow.C | 2 +- cde/programs/dtmail/include/utils/MemUtils.hh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cde/programs/dtmail/dtmail/ComposeCmds.C b/cde/programs/dtmail/dtmail/ComposeCmds.C index 5b1665d0..df95f378 100644 --- a/cde/programs/dtmail/dtmail/ComposeCmds.C +++ b/cde/programs/dtmail/dtmail/ComposeCmds.C @@ -813,7 +813,7 @@ TemplateCmd::doit() char * helpId = DTMAILHELPERROR; int answer = dialog->post_and_return(helpId); SafeClose(fd); - delete [] mbuf.buffer; + delete (char*) mbuf.buffer; free(fullpath); return; } diff --git a/cde/programs/dtmail/dtmail/RoamApp.C b/cde/programs/dtmail/dtmail/RoamApp.C index bb9f0e76..45d1acab 100644 --- a/cde/programs/dtmail/dtmail/RoamApp.C +++ b/cde/programs/dtmail/dtmail/RoamApp.C @@ -598,7 +598,7 @@ tooltalk_msg_handler( if (SafeRead(fd, mbuf.buffer, (unsigned int) buf.st_size) != buf.st_size) { - delete [] mbuf.buffer; + delete (char*) mbuf.buffer; close(fd); return msg; } diff --git a/cde/programs/dtmail/dtmail/RoamCmds.C b/cde/programs/dtmail/dtmail/RoamCmds.C index 7c55d298..9a271971 100644 --- a/cde/programs/dtmail/dtmail/RoamCmds.C +++ b/cde/programs/dtmail/dtmail/RoamCmds.C @@ -3967,7 +3967,7 @@ VacationCmd::parseVacationMessage() helpId = DTMAILHELPCORRUPTVACATION; answer = dialog->post_and_return(helpId); SafeClose(fd); - delete [] mbuf.buffer; + delete (char*) mbuf.buffer; _subject = NULL; _body = NULL; diff --git a/cde/programs/dtmail/dtmail/RoamMenuWindow.C b/cde/programs/dtmail/dtmail/RoamMenuWindow.C index 75764df9..1c05b336 100644 --- a/cde/programs/dtmail/dtmail/RoamMenuWindow.C +++ b/cde/programs/dtmail/dtmail/RoamMenuWindow.C @@ -1152,7 +1152,7 @@ RoamMenuWindow::msgListConvertCallback( bufPtr += mbufList[ii].size; bufPtr[0] = '\n'; bufPtr++; - delete mbufList[ii].buffer; + delete (char*)mbufList[ii].buffer; } XtFree((char *)mbufList); diff --git a/cde/programs/dtmail/include/utils/MemUtils.hh b/cde/programs/dtmail/include/utils/MemUtils.hh index eec84387..b4aa7241 100644 --- a/cde/programs/dtmail/include/utils/MemUtils.hh +++ b/cde/programs/dtmail/include/utils/MemUtils.hh @@ -92,9 +92,9 @@ grow_region(void * old_region, const int old_size, const int new_size) { void * new_region = new unsigned char[new_size]; if (new_region) { - memcpy(new_region, old_region, old_size); + memcpy(new_region, old_region, old_size); } - delete old_region; + delete (unsigned char*) old_region; return(new_region); } -- 2.25.1