From 6566dfc75a73483305c64ac82cf9555d2afb5ba8 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 1 Jun 2021 11:18:24 -0400 Subject: [PATCH] 2021-06-01 Fred Gleason * Cleaned up compile warnings in 'lib/rdcut.cpp'. Signed-off-by: Fred Gleason --- ChangeLog | 2 ++ lib/rdcut.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd79e4e7..31734897 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21768,3 +21768,5 @@ * Removed 'IncrementIndex()', 'GetLock()' and 'ClearLock()' functions from 'lib/rdconf.[cpp|h]'. * Cleaned up compile warning in 'lib/rdconf.cpp'. +2021-06-01 Fred Gleason + * Cleaned up compile warnings in 'lib/rdcut.cpp'. diff --git a/lib/rdcut.cpp b/lib/rdcut.cpp index 359d96dc..ec9e7e0a 100644 --- a/lib/rdcut.cpp +++ b/lib/rdcut.cpp @@ -1799,13 +1799,14 @@ bool RDCut::FileCopy(const QString &srcfile,const QString &destfile) const } buf=(char *)malloc(dest_stat.st_blksize); while((n=read(src_fd,buf,dest_stat.st_blksize))==dest_stat.st_blksize) { - write(dest_fd,buf,dest_stat.st_blksize); + RDCheckExitCode("RDCut::FileCopy write", + write(dest_fd,buf,dest_stat.st_blksize)); bytes+=dest_stat.st_blksize; if((step=10*bytes/src_stat.st_size)!=previous_step) { previous_step=step; } } - write(dest_fd,buf,n); + RDCheckExitCode("RDCut::FileCopy write",write(dest_fd,buf,n)); free(buf); close(src_fd); close(dest_fd);