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



##########
File path: 
extensions/openwsman/processors/SourceInitiatedSubscriptionListener.cpp
##########
@@ -248,9 +248,9 @@ bool SourceInitiatedSubscriptionListener::loadState() {
   return true;
 }
 
-std::string 
SourceInitiatedSubscriptionListener::Handler::millisecondsToXsdDuration(int64_t 
milliseconds) {
+std::string 
SourceInitiatedSubscriptionListener::Handler::millisecondsToXsdDuration(std::chrono::milliseconds
 milliseconds) {
   char buf[1024];
-  snprintf(buf, sizeof(buf), "PT%" PRId64 ".%03" PRId64 "S", milliseconds / 
1000, milliseconds % 1000);
+  snprintf(buf, sizeof(buf), "PT%" PRId64 ".%03" PRId64 "S", 
milliseconds.count() / 1000, milliseconds.count() % 1000);

Review comment:
       the requirement for `std::chrono::milliseconds::rep` is that it is a 
signed integer type of at least 45 bits, on most hardware this probably means 
`int64_t` but it might not be, a cast would help ensure that `PRId64` is the 
correct format specifier




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

To unsubscribe, e-mail: [email protected]

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


Reply via email to