szaszm commented on a change in pull request #1083:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1083#discussion_r643987530



##########
File path: extensions/libarchive/MergeContent.h
##########
@@ -80,18 +80,18 @@ class BinaryConcatenationMerge : public MergeBin {
     int64_t process(const std::shared_ptr<io::BaseStream>& stream) {
       int64_t ret = 0;
       if (!header_.empty()) {
-        int64_t len = 
stream->write(reinterpret_cast<uint8_t*>(const_cast<char*>(header_.data())), 
gsl::narrow<int>(header_.size()));
-        if (len < 0)
-          return len;
-        ret += len;
+        const auto write_ret = 
stream->write(reinterpret_cast<uint8_t*>(const_cast<char*>(header_.data())), 
header_.size());
+        if (io::isError(write_ret))
+          return -1;
+        ret += gsl::narrow<int64_t>(write_ret);

Review comment:
       done in 5c6ba7b

##########
File path: extensions/libarchive/CompressContent.h
##########
@@ -386,7 +386,7 @@ class CompressContent : public core::Processor {
               if (io::isError(writeret) || gsl::narrow<size_t>(writeret) != 
ret) {
                 return -1;
               }
-              read_size += ret;
+              read_size += gsl::narrow<int64_t>(ret);

Review comment:
       done in 5c6ba7b




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to