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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]