You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/01/05 12:06:00 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #964: MINIFICPP-1443 Fix 'possible loss of data' warnings

adamdebreceni commented on a change in pull request #964:
URL: https://github.com/apache/nifi-minifi-cpp/pull/964#discussion_r551891610



##########
File path: libminifi/src/provenance/Provenance.cpp
##########
@@ -178,8 +181,8 @@ bool ProvenanceEventRecord::Serialize(org::apache::nifi::minifi::io::BufferStrea
 
   if (this->_eventType == ProvenanceEventRecord::FORK || this->_eventType == ProvenanceEventRecord::CLONE || this->_eventType == ProvenanceEventRecord::JOIN) {
     // write UUIDs
-    uint32_t number = this->_parentUuids.size();
-    ret = outStream.write(number);
+    uint32_t parent_uuids_size = gsl::narrow<uint32_t>(this->_parentUuids.size());

Review comment:
       an alternative name could be `parent_uuids_count`, although not sure if it is "better"




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