fgerlits commented on a change in pull request #848: URL: https://github.com/apache/nifi-minifi-cpp/pull/848#discussion_r465978905
########## File path: libminifi/include/io/CRCStream.h ########## @@ -224,7 +222,7 @@ template<typename T> int CRCStream<T>::readData(uint8_t *buf, int buflen) { int ret = child_stream_->read(buf, buflen); if (ret > 0) { - crc_ = crc32(crc_, buf, ret); + crc_ = crc32(gsl::narrow<uLong>(crc_), buf, ret); Review comment: `uLong` in zlib is a typedef to `unsigned long`, so on 64-bit Linux it is 64 bits. I have changed the type of `crc_` to `uLong`, so now we only have one `gsl::narrow` (called once per instance) instead of three (called many times). ---------------------------------------------------------------- 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