arpadboda commented on a change in pull request #648: WIP: Minificpp 1025 -- 
add metadata
URL: https://github.com/apache/nifi-minifi-cpp/pull/648#discussion_r329130055
 
 

 ##########
 File path: extensions/windows-event-log/wel/MetadataWalker.cpp
 ##########
 @@ -17,21 +19,62 @@ bool MetadataWalker::for_each(pugi::xml_node &node) {
 
                        if (std::regex_match(attr.name(), regex_)) {
                                std::function<std::string(const std::string &)> 
idUpdate = [&](const std::string &input) -> std::string {
-                                       return resolve_ ? 
utils::OsUtils::userIdToUsername(input) : input;
+                                       if (resolve_) {
+                                               auto resolved = 
utils::OsUtils::userIdToUsername(input);
+                                               replaced_identifiers_[input] = 
resolved;
+                                               return resolved;
+                                       }
+                                       else {
+                                               replaced_identifiers_[input] = 
input;
 
 Review comment:
   This else branch has no return value. Which surely triggers a warning, but 
I'm afraid it's an undefined behaviour.

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