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 2020/09/04 08:01:52 UTC

[GitHub] [nifi-minifi-cpp] hunyadi-dev opened a new pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

hunyadi-dev opened a new pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895


   Script used:
   cat build_logs.log | grep -v "thirdparty" | sort | uniq | egrep "\[-Wunused-parameter*\]" | tr ":" " " | cut -d" " -f1,2,9 | tr "'" " " | tr -s " " | xargs -n3 python -c 'import os,sys; print("%s %s %s" % (os.path.abspath(sys.argv[1]), sys.argv[2], sys.argv[3]))' | sort | uniq | xargs -n 3 sh -c 'perl -pi -e "$. == $2 && s;( *([*&])? *)$3( *= *?[\w:]*(\(\))?)* *(?=[\),]);\2 /*$3*/\3;" $1' sh
   
   Manual edits (due to C compatibility enforcing naming arguments) in:
   nanofi/include/sitetosite/CPeer.h
   nanofi/include/sitetosite/CRawSocketProtocol.h
   nanofi/src/sitetosite/CRawSocketProtocol.c
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
hunyadi-dev commented on a change in pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895#discussion_r488416568



##########
File path: libminifi/include/utils/file/FileUtils.h
##########
@@ -115,14 +115,15 @@ class FileUtils {
    * @param force_posix returns the posix path separator ('/'), even when not on posix. Useful when dealing with remote posix paths.
    * @return the path separator character
    */
-  static char get_separator(bool force_posix = false) {
 #ifdef WIN32
+  static char get_separator(bool force_posix = false) {

Review comment:
       Fixed by having the closing brace appear in both versions inside the macro.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm closed pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
szaszm closed pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895#discussion_r488243927



##########
File path: libminifi/include/utils/file/FileUtils.h
##########
@@ -115,14 +115,15 @@ class FileUtils {
    * @param force_posix returns the posix path separator ('/'), even when not on posix. Useful when dealing with remote posix paths.
    * @return the path separator character
    */
-  static char get_separator(bool force_posix = false) {
 #ifdef WIN32
+  static char get_separator(bool force_posix = false) {

Review comment:
       I'd keep this outside the `#ifdef` to avoid confusing simple editors with the multiple braces. Use `(void)force_posix;` inside the function body to suppress the warning.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm closed pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
szaszm closed pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
szaszm commented on pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895#issuecomment-705028211


   I'd be fine with this after a rebase


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
hunyadi-dev commented on a change in pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895#discussion_r553901250



##########
File path: extensions/civetweb/processors/ListenHTTP.cpp
##########
@@ -211,7 +211,7 @@ void ListenHTTP::onSchedule(core::ProcessContext *context, core::ProcessSessionF
 
 ListenHTTP::~ListenHTTP() = default;
 
-void ListenHTTP::onTrigger(core::ProcessContext *context, core::ProcessSession *session) {
+void ListenHTTP::onTrigger(core::ProcessContext* /*context*/, core::ProcessSession *session) {

Review comment:
       I don't have a quick-fix for that. People probably need to edit those cases one-by-one when they encounter them.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895#discussion_r484897206



##########
File path: extensions/civetweb/processors/ListenHTTP.cpp
##########
@@ -211,7 +211,7 @@ void ListenHTTP::onSchedule(core::ProcessContext *context, core::ProcessSessionF
 
 ListenHTTP::~ListenHTTP() = default;
 
-void ListenHTTP::onTrigger(core::ProcessContext *context, core::ProcessSession *session) {
+void ListenHTTP::onTrigger(core::ProcessContext* /*context*/, core::ProcessSession *session) {

Review comment:
       I would remove commented variables where the parameter is self-explanatory or has even less meaning than the typename, like ProcessContext - context, CivetServer - server, Configure - configure, ProcessSessionFactory - sessionFactory, ProcessGroup - pg, Parameters params, Repository - repo and so on. If you have an idea it could be filtered and replaced easily go ahead, if it would be too exhausting, just leave it for 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.

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



[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #895: MINIFICPP-1352 - Comment out unused parameters (for enabling -Wall)

Posted by GitBox <gi...@apache.org>.
hunyadi-dev commented on a change in pull request #895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/895#discussion_r553901250



##########
File path: extensions/civetweb/processors/ListenHTTP.cpp
##########
@@ -211,7 +211,7 @@ void ListenHTTP::onSchedule(core::ProcessContext *context, core::ProcessSessionF
 
 ListenHTTP::~ListenHTTP() = default;
 
-void ListenHTTP::onTrigger(core::ProcessContext *context, core::ProcessSession *session) {
+void ListenHTTP::onTrigger(core::ProcessContext* /*context*/, core::ProcessSession *session) {

Review comment:
       I don't have a quick-fix for that. People probably need to edit those cases one-by-one when they encounter them.




----------------------------------------------------------------
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:
users@infra.apache.org