From 81b473b4a15db38b9f0e9220cfb7a30e371dd273 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Wed, 11 Jun 2008 00:58:41 +0000 Subject: [PATCH] Fix warning in generated source for alterl bindings Summary: - Was previously including both the fall-through to the base service as well as the "dummy" fallthrough function clause. This generated a warning like: gen-erl/redacted_thrift.erl:134: Warning: this clause cannot match because a previous clause at line 132 always matches Now we only include the "dummy" function if there is no base class to fall through to. Test plan: Generated tutorial.thrift and shared.thrift, compiled without warnings Notes: It's probably possible to have a circular inheritance graph, which would cause an infinite loop at runtime. Do we care about this? git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666423 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/generate/t_alterl_generator.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/cpp/src/generate/t_alterl_generator.cc b/compiler/cpp/src/generate/t_alterl_generator.cc index f27670f1..996b2ad4 100644 --- a/compiler/cpp/src/generate/t_alterl_generator.cc +++ b/compiler/cpp/src/generate/t_alterl_generator.cc @@ -495,13 +495,13 @@ void t_alterl_generator::generate_service_interface(t_service* tservice) { indent(f_service_) << "function_info(Function, InfoType) ->" << endl; indent_up(); indent(f_service_) << uncapitalize(tservice->get_extends()->get_name()) - << "_thrift:function_info(Function, InfoType);" << endl; + << "_thrift:function_info(Function, InfoType)." << endl; indent_down(); + } else { + // Dummy function_info so we don't worry about the ;s + indent(f_service_) << "function_info(xxx, dummy) -> dummy." << endl; } - // Dummy function_info so we don't worry about the ;s - indent(f_service_) << "function_info(xxx, dummy) -> dummy." << endl; - indent(f_service_) << endl; } -- 2.17.1