Fix to delete-incomplete warnings.
authorJose Rubio <joserubiovidales@gmail.com>
Fri, 11 Oct 2019 11:43:08 +0000 (13:43 +0200)
committerJose Rubio <joserubiovidales@gmail.com>
Fri, 11 Oct 2019 11:43:08 +0000 (13:43 +0200)
cde/programs/dtmail/dtmail/ComposeCmds.C
cde/programs/dtmail/dtmail/RoamApp.C
cde/programs/dtmail/dtmail/RoamCmds.C
cde/programs/dtmail/dtmail/RoamMenuWindow.C
cde/programs/dtmail/include/utils/MemUtils.hh

index 5b1665d003903b36bffd2015e8ba9ae420d041ed..df95f378c230d49b7dccdd508ccff2c21f8e65e0 100644 (file)
@@ -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;
        }
index bb9f0e761ca831c04a489542045693a40b34a33b..45d1acab2f91edb03190701ec0fe756975181e45 100644 (file)
@@ -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;
            }
index 7c55d298926511ad0e8dbbdec13cc7a91f73fd23..9a27197197d203f0601b68f4ccf07c75090d0077 100644 (file)
@@ -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;
 
index 75764df982bc628c8129a1ddcc464c865fcec701..1c05b336cb195fa6a1caadf9f8fbb35e7fd5801f 100644 (file)
@@ -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);
index eec84387052f21a583313eff50a3fc95e41fb766..b4aa7241c7600710db2b4e3a5a0974435cca626b 100644 (file)
@@ -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);
 }