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


##########
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:
   There was no example that assigned owner through a pointer parameter. The 
examples don't have an additional layer of indirection over the owner.
   
   Could you double check that leaving the gsl::owner annotation in place 
doesn't solve the warning? The C-style cast one should probably be just 
disabled, due to the high number of false positives.



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