lordgamez commented on code in PR #1671:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1671#discussion_r1341013782


##########
extensions/systemd/tests/ConsumeJournaldTest.cpp:
##########
@@ -90,7 +90,7 @@ struct TestJournal final : libwrapper::Journal {
   }
 
   int getCursor(gsl::owner<char*>* const cursor_out) noexcept override {
-    *cursor_out = gsl::owner<char*>(strdup(std::to_string(consumed).c_str()));
+    *cursor_out = strdup(std::to_string(consumed).c_str());  // 
NOLINT(cppcoreguidelines-owning-memory)

Review Comment:
   As the `cursor_out` parameter is already a `gsl::owner` type the cast and 
according to [these 
examples](https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/owning-memory.html)
 that should be enough to mark the returned pointer's onwership. The previous 
annotation was marked as a C-style cast, but I think the current 
`cppcoreguidelines-owning-memory` warning is also a false positive so it was 
suppressed.



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