You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/08/04 14:14:38 UTC

[GitHub] [nifi-minifi-cpp] adam-markovics opened a new pull request, #1382: MINIFICPP-1899 - Fix local Docker build failure

adam-markovics opened a new pull request, #1382:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382

   https://issues.apache.org/jira/browse/MINIFICPP-1899
   
   Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced
        in the commit message?
   
   - [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
   


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi-minifi-cpp] adam-markovics commented on a diff in pull request #1382: MINIFICPP-1899 - Fix local Docker build failure

Posted by GitBox <gi...@apache.org>.
adam-markovics commented on code in PR #1382:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382#discussion_r940355679


##########
libminifi/src/utils/BackTrace.cpp:
##########
@@ -54,8 +54,10 @@ namespace {
 }  // namespace
 #endif
 
+#ifndef HAS_EXECINFO
+void pull_trace(uint8_t) {
+#else  // HAS_EXECINFO
 void pull_trace(uint8_t frames_to_skip /* = 1 */) {

Review Comment:
   Thanks for the idea! I didn't realize `[[maybe_unused]]` could be used on parameters, not just return values. Fixed now.



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi-minifi-cpp] fgerlits commented on a diff in pull request #1382: MINIFICPP-1899 - Fix local Docker build failure

Posted by GitBox <gi...@apache.org>.
fgerlits commented on code in PR #1382:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382#discussion_r937927632


##########
libminifi/src/utils/BackTrace.cpp:
##########
@@ -117,6 +117,8 @@ void pull_trace(uint8_t frames_to_skip /* = 1 */) {
 
     TraceResolver::getResolver().addTraceLine(file_name, symbol_name.c_str(), symbol_offset);
   }
+#else
+  (void)(frames_to_skip);

Review Comment:
   It is hard to see what condition this `#else` refers to.  I think
   ```c++
   #ifndef HAS_EXECINFO
   void pull_trace(uint8_t) {}
   #else
   void pull_trace(uint8_t frames_to_skip /* = 1 */) {
   ...
   }
   #endif
   ```
   would be more readable.



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi-minifi-cpp] adam-markovics commented on a diff in pull request #1382: MINIFICPP-1899 - Fix local Docker build failure

Posted by GitBox <gi...@apache.org>.
adam-markovics commented on code in PR #1382:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382#discussion_r940359021


##########
libminifi/src/utils/BackTrace.cpp:
##########
@@ -129,9 +129,6 @@ BackTrace TraceResolver::getBackTrace(std::string thread_name, std::thread::nati
   if (0 == thread_handle || pthread_equal(pthread_self(), thread_handle)) {
     pull_trace();
   } else {
-    if (thread_handle == 0) {

Review Comment:
   It was impossible for control flow to reach this because this case was handled in the previous `if`.



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi-minifi-cpp] martinzink commented on a diff in pull request #1382: MINIFICPP-1899 - Fix local Docker build failure

Posted by GitBox <gi...@apache.org>.
martinzink commented on code in PR #1382:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382#discussion_r938707263


##########
libminifi/src/utils/BackTrace.cpp:
##########
@@ -54,8 +54,10 @@ namespace {
 }  // namespace
 #endif
 
+#ifndef HAS_EXECINFO
+void pull_trace(uint8_t) {
+#else  // HAS_EXECINFO
 void pull_trace(uint8_t frames_to_skip /* = 1 */) {

Review Comment:
   I think we can avoid these ifndef-s and (void) workarounds with the new [C++ attribute: maybe_unused (since C++17)](https://en.cppreference.com/w/cpp/language/attributes/maybe_unused)
   Something like should work imho
   ```suggestion
   void pull_trace([[maybe_unused]] uint8_t frames_to_skip /* = 1 */) {
   ```



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi-minifi-cpp] adam-markovics commented on a diff in pull request #1382: MINIFICPP-1899 - Fix local Docker build failure

Posted by GitBox <gi...@apache.org>.
adam-markovics commented on code in PR #1382:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382#discussion_r938058318


##########
libminifi/src/utils/BackTrace.cpp:
##########
@@ -117,6 +117,8 @@ void pull_trace(uint8_t frames_to_skip /* = 1 */) {
 
     TraceResolver::getResolver().addTraceLine(file_name, symbol_name.c_str(), symbol_offset);
   }
+#else
+  (void)(frames_to_skip);

Review Comment:
   I agree. Because indentation cannot be used to mark nested `#ifdef`s I added some more comments to help a bit.



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi-minifi-cpp] fgerlits closed pull request #1382: MINIFICPP-1899 - Fix local Docker build failure

Posted by GitBox <gi...@apache.org>.
fgerlits closed pull request #1382: MINIFICPP-1899 - Fix local Docker build failure
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi-minifi-cpp] martinzink commented on a diff in pull request #1382: MINIFICPP-1899 - Fix local Docker build failure

Posted by GitBox <gi...@apache.org>.
martinzink commented on code in PR #1382:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1382#discussion_r938707263


##########
libminifi/src/utils/BackTrace.cpp:
##########
@@ -54,8 +54,10 @@ namespace {
 }  // namespace
 #endif
 
+#ifndef HAS_EXECINFO
+void pull_trace(uint8_t) {
+#else  // HAS_EXECINFO
 void pull_trace(uint8_t frames_to_skip /* = 1 */) {

Review Comment:
   I think we can avoid these ifndef-s and (void) workarounds with the new [C++ attribute: maybe_unused (since C++17)](https://en.cppreference.com/w/cpp/language/attributes/maybe_unused)
   ```suggestion
   void pull_trace([[maybe_unused]] uint8_t frames_to_skip /* = 1 */) {
   ```



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org