szaszm commented on a change in pull request #744: MINIFICPP-1171 - Fix "%ll" 
format strings in log lines
URL: https://github.com/apache/nifi-minifi-cpp/pull/744#discussion_r387624653
 
 

 ##########
 File path: libminifi/src/core/ProcessSession.cpp
 ##########
 @@ -184,7 +184,7 @@ std::shared_ptr<core::FlowFile> 
ProcessSession::clone(const std::shared_ptr<core
     if (parent->getResourceClaim()) {
       if ((uint64_t) (offset + size) > parent->getSize()) {
         // Set offset and size
-        logger_->log_error("clone offset %ll and size %ll exceed parent size 
%llu", offset, size, parent->getSize());
+        logger_->log_error("clone offset %lld and size %lld exceed parent size 
%llu", offset, size, parent->getSize());
 
 Review comment:
   Use `PRId64` from `<cinttypes>` for `int64_t`. `lld` is meant to be used for 
`long long int`, which is not guaranteed to be the same as `int64_t`. It is not 
the same on my platform.
   
   Could you please fix the existing `llu` format specifier in the same 
fashion, to `PRIu64`? I know it's old code and our codebase is full of this 
kind of misuse, but if we already change the line, let's apply easy fixes to 
existing issues.
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to