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



##########
File path: libminifi/src/io/InputStream.cpp
##########
@@ -84,9 +85,9 @@ int InputStream::read(std::string &str, bool widen) {
   }
 
   std::vector<uint8_t> buffer(len);
-  uint32_t bytes_read = gsl::narrow<uint32_t>(read(buffer.data(), len));
+  const auto bytes_read = gsl::narrow<uint32_t>(read(buffer.data(), len));
   if (bytes_read != len) {
-    return -1;
+    return static_cast<size_t>(-1);

Review comment:
       It would, but there is only one occurrence of returning -2 and I think 
it doesn't hit this path. That one occurrence should be cleaned up in the 
future anyway, so it's not an important issue IMO.
   I will change it to forward the original return value, but if it mattered, 
we would already have an issue.




-- 
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:
us...@infra.apache.org


Reply via email to