You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2022/04/12 04:49:36 UTC

[GitHub] [thrift] Jimexist commented on a diff in pull request #2559: THRIFT-5551: java generator to add @Override where possible

Jimexist commented on code in PR #2559:
URL: https://github.com/apache/thrift/pull/2559#discussion_r847963852


##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -2108,8 +2117,8 @@ void t_java_generator::generate_java_struct_compare_to(ostream& out, t_struct* t
  *
  * @param tstruct The struct definition
  */
-void t_java_generator::generate_java_struct_reader(ostream& out, t_struct* tstruct) {
-  (void)tstruct;
+void t_java_generator::generate_java_struct_reader(ostream& out, t_struct* /*tstruct*/) {

Review Comment:
   both are valid ways to suppress warnings about unused variables (in this case an error because `-Werror` flag is present).
   
   https://stackoverflow.com/questions/308277/what-are-the-consequences-of-ignoring-warning-unused-parameter/308286#308286
   
   i'd prefer the commenting out way because an extra line with `(void)` is a bit arcane.



-- 
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: notifications-unsubscribe@thrift.apache.org

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