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


##########
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:
   I was referring to the example assigning the returned value of a function to 
a `gsl::owner<>` type, as we are assigning to the pointed value I don't think 
the pointer parameter is relevant in this case, the warning would be the same 
if we only had a  `gsl::owner<char*>` type parameter. I can revert it as the 
C-style cast check will be removed.



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