fix compiler warnings
authorRoger Meier <roger@apache.org>
Sat, 10 Dec 2011 21:50:10 +0000 (21:50 +0000)
committerRoger Meier <roger@apache.org>
Sat, 10 Dec 2011 21:50:10 +0000 (21:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212892 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_cpp_generator.cc

index 4b7fb7b..5071041 100755 (executable)
@@ -3187,6 +3187,12 @@ void t_cpp_generator::generate_process_function(t_service* tservice,
     string resultname = tservice->get_name() + "_" + tfunction->get_name() +
       "_result";
 
+    if (tfunction->is_oneway() && !unnamed_oprot_seqid) {
+      out <<
+        indent() << "(void) seqid;" << endl <<
+        indent() << "(void) oprot;" << endl;
+    }
+
     out <<
       indent() << "void* ctx = NULL;" << endl <<
       indent() << "if (this->eventHandler_.get() != NULL) {" << endl <<