szaszm commented on a change in pull request #741: MINIFICPP-1139 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/741#discussion_r383252704
 
 

 ##########
 File path: extensions/windows-event-log/Bookmark.cpp
 ##########
 @@ -205,7 +206,7 @@ bool Bookmark::getBookmarkXmlFromFile(std::wstring& 
bookmarkXml) {
   // '!' should be at the end of bookmark.
   auto pos = bookmarkXml.find(L'!');
   if (std::wstring::npos == pos) {
-    logger_->log_error("No '!' in bookmarXml '%s'", bookmarkXml.c_str());
+    logger_->log_error("No '!' in bookmarXml '%ws'", bookmarkXml.c_str());
 
 Review comment:
   I appreciate the intention, but there is no `w` conversion specifier for 
[`printf` 
](https://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html). Use 
`%ls` for `wchar_t*` wide c strings.
   
   Even though spdlog uses cppformat (nowadays called {fmt}/`std::format`) 
internally, its docs reference the printf man page for format string 
specification, so the results are not documented in case of an invalid format 
string. (Probably a `runtime_error` thrown.)

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