summaryrefslogtreecommitdiff
path: root/compiler/cpp/src/generate
diff options
context:
space:
mode:
authorRoger Meier <roger@apache.org>2010-11-17 22:11:26 +0000
committerRoger Meier <roger@apache.org>2010-11-17 22:11:26 +0000
commit3b771a10f1b815d5168d244374cddd1014ba3c02 (patch)
treeb317075bdba17f1291f5dfda00d02cb6fe410857 /compiler/cpp/src/generate
parentbe87ab28b06323f46835983ce2501b952978bda2 (diff)
downloadthrift-3b771a10f1b815d5168d244374cddd1014ba3c02.tar.gz
THRIFT-916 compile with -Wall -Wextra without warning on Debian Lenny
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1036250 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'compiler/cpp/src/generate')
-rw-r--r--compiler/cpp/src/generate/t_as3_generator.cc14
-rw-r--r--compiler/cpp/src/generate/t_c_glib_generator.cc6
-rw-r--r--compiler/cpp/src/generate/t_cocoa_generator.cc4
-rw-r--r--compiler/cpp/src/generate/t_cpp_generator.cc4
-rw-r--r--compiler/cpp/src/generate/t_csharp_generator.cc11
-rw-r--r--compiler/cpp/src/generate/t_erl_generator.cc8
-rw-r--r--compiler/cpp/src/generate/t_generator.h9
-rw-r--r--compiler/cpp/src/generate/t_hs_generator.cc5
-rw-r--r--compiler/cpp/src/generate/t_html_generator.cc2
-rw-r--r--compiler/cpp/src/generate/t_java_generator.cc14
-rw-r--r--compiler/cpp/src/generate/t_javame_generator.cc15
-rw-r--r--compiler/cpp/src/generate/t_js_generator.cc20
-rw-r--r--compiler/cpp/src/generate/t_ocaml_generator.cc4
-rw-r--r--compiler/cpp/src/generate/t_perl_generator.cc10
-rw-r--r--compiler/cpp/src/generate/t_php_generator.cc6
-rw-r--r--compiler/cpp/src/generate/t_py_generator.cc10
-rw-r--r--compiler/cpp/src/generate/t_rb_generator.cc8
-rw-r--r--compiler/cpp/src/generate/t_st_generator.cc6
-rw-r--r--compiler/cpp/src/generate/t_xsd_generator.cc6
19 files changed, 139 insertions, 23 deletions
diff --git a/compiler/cpp/src/generate/t_as3_generator.cc b/compiler/cpp/src/generate/t_as3_generator.cc
index d06d93373..aa258a15b 100644
--- a/compiler/cpp/src/generate/t_as3_generator.cc
+++ b/compiler/cpp/src/generate/t_as3_generator.cc
@@ -44,6 +44,7 @@ class t_as3_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
iter = parsed_options.find("bindable");
@@ -285,7 +286,9 @@ void t_as3_generator::close_generator() {}
*
* @param ttypedef The type definition
*/
-void t_as3_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_as3_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Enums are a class with a set of static constants.
@@ -498,6 +501,7 @@ void t_as3_generator::print_const_value(std::ofstream& out, string name, t_type*
}
string t_as3_generator::render_const_value(ofstream& out, string name, t_type* type, t_const_value* value) {
+ (void) name;
type = get_true_type(type);
std::ostringstream render;
@@ -967,6 +971,8 @@ void t_as3_generator::generate_as3_struct_result_writer(ofstream& out,
}
void t_as3_generator::generate_reflection_getters(ostringstream& out, t_type* type, string field_name, string cap_name) {
+ (void) type;
+ (void) cap_name;
indent(out) << "case " << upcase_string(field_name) << ":" << endl;
indent_up();
indent(out) << "return this." << field_name << ";" << endl;
@@ -974,6 +980,8 @@ void t_as3_generator::generate_reflection_getters(ostringstream& out, t_type* ty
}
void t_as3_generator::generate_reflection_setters(ostringstream& out, t_type* type, string field_name, string cap_name) {
+ (void) type;
+ (void) cap_name;
indent(out) << "case " << upcase_string(field_name) << ":" << endl;
indent_up();
indent(out) << "if (value == null) {" << endl;
@@ -1772,6 +1780,7 @@ void t_as3_generator::generate_function_helpers(t_function* tfunction) {
*/
void t_as3_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
+ (void) tservice;
// Open class
indent(f_service_) <<
"private function " << tfunction->get_name() << "():Function {" << endl;
@@ -2194,6 +2203,7 @@ void t_as3_generator::generate_serialize_field(ofstream& out,
void t_as3_generator::generate_serialize_struct(ofstream& out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
out <<
indent() << prefix << ".write(oprot);" << endl;
}
@@ -2313,6 +2323,7 @@ void t_as3_generator::generate_serialize_list_element(ofstream& out,
* @return As3 type name, i.e. HashMap<Key,Value>
*/
string t_as3_generator::type_name(t_type* ttype, bool in_container, bool in_init) {
+ (void) in_init;
// In As3 typedefs are just resolved to their real type
ttype = get_true_type(ttype);
string prefix;
@@ -2349,6 +2360,7 @@ string t_as3_generator::type_name(t_type* ttype, bool in_container, bool in_init
*/
string t_as3_generator::base_type_name(t_base_type* type,
bool in_container) {
+ (void) in_container;
t_base_type::t_base tbase = type->get_base();
switch (tbase) {
diff --git a/compiler/cpp/src/generate/t_c_glib_generator.cc b/compiler/cpp/src/generate/t_c_glib_generator.cc
index a569ae61a..8d34bac03 100644
--- a/compiler/cpp/src/generate/t_c_glib_generator.cc
+++ b/compiler/cpp/src/generate/t_c_glib_generator.cc
@@ -28,6 +28,8 @@ class t_c_glib_generator : public t_oop_generator
const map<string, string> &parsed_options,
const string &option_string) : t_oop_generator (program)
{
+ (void) parsed_options;
+ (void) option_string;
/* set the output directory */
this->out_dir_base_ = "gen-c_glib";
@@ -520,6 +522,7 @@ t_c_glib_generator::is_complex_type (t_type *ttype)
string
t_c_glib_generator::type_name (t_type* ttype, bool in_typedef, bool is_const)
{
+ (void) in_typedef;
if (ttype->is_base_type ())
{
string bname = base_type_name ((t_base_type *) ttype);
@@ -1709,6 +1712,7 @@ t_c_glib_generator::generate_service_client (t_service *tservice)
void
t_c_glib_generator::generate_service_server (t_service *tservice)
{
+ (void) tservice;
/* get some C friendly service names */
string service_name_u = initial_caps_to_underscores (service_name_);
string service_name_uc = to_upper_case (service_name_u);
@@ -2349,6 +2353,7 @@ void
t_c_glib_generator::generate_serialize_struct (ofstream &out, t_struct *tstruct,
string prefix, int error_ret)
{
+ (void) tstruct;
out <<
indent () << "if ((ret = thrift_struct_write (THRIFT_STRUCT (" << prefix << "), protocol, error)) < 0)" << endl <<
indent () << " return " << error_ret << ";" << endl <<
@@ -2823,6 +2828,7 @@ t_c_glib_generator::generate_deserialize_list_element (ofstream &out, t_list *tl
string prefix, string index,
int error_ret)
{
+ (void) index;
string elem = tmp ("_elem");
t_field felem (tlist->get_elem_type (), elem);
diff --git a/compiler/cpp/src/generate/t_cocoa_generator.cc b/compiler/cpp/src/generate/t_cocoa_generator.cc
index 29ace00b4..26537ac15 100644
--- a/compiler/cpp/src/generate/t_cocoa_generator.cc
+++ b/compiler/cpp/src/generate/t_cocoa_generator.cc
@@ -43,6 +43,7 @@ class t_cocoa_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
iter = parsed_options.find("log_unexpected");
@@ -541,6 +542,7 @@ void t_cocoa_generator::generate_cocoa_struct_initializer_signature(ofstream &ou
void t_cocoa_generator::generate_cocoa_struct_field_accessor_declarations(ofstream &out,
t_struct* tstruct,
bool is_exception) {
+ (void) is_exception;
const vector<t_field*>& members = tstruct->get_members();
vector<t_field*>::const_iterator m_iter;
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
@@ -1019,6 +1021,7 @@ void t_cocoa_generator::generate_cocoa_struct_result_writer(ofstream& out,
void t_cocoa_generator::generate_cocoa_struct_field_accessor_implementations(ofstream& out,
t_struct* tstruct,
bool is_exception) {
+ (void) is_exception;
const vector<t_field*>& fields = tstruct->get_members();
vector<t_field*>::const_iterator f_iter;
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
@@ -1954,6 +1957,7 @@ void t_cocoa_generator::generate_serialize_field(ofstream& out,
void t_cocoa_generator::generate_serialize_struct(ofstream& out,
t_struct* tstruct,
string fieldName) {
+ (void) tstruct;
out <<
indent() << "[" << fieldName << " write: outProtocol];" << endl;
}
diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc
index f5c8def81..6fe339798 100644
--- a/compiler/cpp/src/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/generate/t_cpp_generator.cc
@@ -48,6 +48,7 @@ class t_cpp_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
iter = parsed_options.find("pure_enums");
@@ -686,6 +687,7 @@ void t_cpp_generator::print_const_value(ofstream& out, string name, t_type* type
*
*/
string t_cpp_generator::render_const_value(ofstream& out, string name, t_type* type, t_const_value* value) {
+ (void) name;
std::ostringstream render;
if (type->is_base_type()) {
@@ -3389,6 +3391,7 @@ void t_cpp_generator::generate_deserialize_field(ofstream& out,
void t_cpp_generator::generate_deserialize_struct(ofstream& out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
indent(out) <<
"xfer += " << prefix << ".read(iprot);" << endl;
}
@@ -3607,6 +3610,7 @@ void t_cpp_generator::generate_serialize_field(ofstream& out,
void t_cpp_generator::generate_serialize_struct(ofstream& out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
indent(out) <<
"xfer += " << prefix << ".write(oprot);" << endl;
}
diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc
index d32652cf0..45ed646bf 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -44,6 +44,8 @@ class t_csharp_generator : public t_oop_generator
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-csharp";
}
void init_generator();
@@ -175,7 +177,9 @@ string t_csharp_generator::csharp_thrift_usings() {
}
void t_csharp_generator::close_generator() { }
-void t_csharp_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_csharp_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
void t_csharp_generator::generate_enum(t_enum* tenum) {
string f_enum_name = namespace_dir_+"/" + (tenum->get_name())+".cs";
@@ -334,6 +338,7 @@ bool t_csharp_generator::print_const_value(std::ofstream& out, string name, t_ty
}
std::string t_csharp_generator::render_const_value(ofstream& out, string name, t_type* type, t_const_value* value) {
+ (void) name;
std::ostringstream render;
if (type->is_base_type()) {
@@ -1096,6 +1101,7 @@ void t_csharp_generator::generate_function_helpers(t_function* tfunction) {
}
void t_csharp_generator::generate_process_function(t_service* tservice, t_function* tfunction) {
+ (void) tservice;
indent(f_service_) <<
"public void " << tfunction->get_name() << "_Process(int seqid, TProtocol iprot, TProtocol oprot)" << endl;
scope_up(f_service_);
@@ -1424,6 +1430,7 @@ void t_csharp_generator::generate_serialize_field(ofstream& out, t_field* tfield
}
void t_csharp_generator::generate_serialize_struct(ofstream& out, t_struct* tstruct, string prefix) {
+ (void) tstruct;
out <<
indent() << prefix << ".Write(oprot);" << endl;
}
@@ -1537,6 +1544,7 @@ std::string t_csharp_generator::prop_name(t_field* tfield) {
}
string t_csharp_generator::type_name(t_type* ttype, bool in_container, bool in_init) {
+ (void) in_init;
while (ttype->is_typedef()) {
ttype = ((t_typedef*)ttype)->get_type();
}
@@ -1567,6 +1575,7 @@ string t_csharp_generator::type_name(t_type* ttype, bool in_container, bool in_i
}
string t_csharp_generator::base_type_name(t_base_type* tbase, bool in_container) {
+ (void) in_container;
switch (tbase->get_base()) {
case t_base_type::TYPE_VOID:
return "void";
diff --git a/compiler/cpp/src/generate/t_erl_generator.cc b/compiler/cpp/src/generate/t_erl_generator.cc
index 7e2ac75cd..0f9a8223a 100644
--- a/compiler/cpp/src/generate/t_erl_generator.cc
+++ b/compiler/cpp/src/generate/t_erl_generator.cc
@@ -44,6 +44,8 @@ class t_erl_generator : public t_generator {
const std::string& option_string)
: t_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
program_name_[0] = tolower(program_name_[0]);
service_name_[0] = tolower(service_name_[0]);
out_dir_base_ = "gen-erl";
@@ -213,6 +215,7 @@ void t_erl_generator::hrl_header(ostream& out, string name) {
}
void t_erl_generator::hrl_footer(ostream& out, string name) {
+ (void) name;
out << "-endif." << endl;
}
@@ -274,6 +277,7 @@ void t_erl_generator::close_generator() {
* @param ttypedef The type definition
*/
void t_erl_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
}
/**
@@ -472,6 +476,7 @@ void t_erl_generator::generate_erl_struct_definition(ostream& out,
bool is_exception,
bool is_result)
{
+ (void) is_result;
const vector<t_field*>& members = tstruct->get_members();
vector<t_field*>::const_iterator m_iter;
@@ -612,6 +617,7 @@ void t_erl_generator::generate_service_helpers(t_service* tservice) {
* @param tfunction The function
*/
void t_erl_generator::generate_erl_function_helpers(t_function* tfunction) {
+ (void) tfunction;
}
/**
@@ -655,7 +661,7 @@ void t_erl_generator::generate_service_interface(t_service* tservice) {
*/
void t_erl_generator::generate_function_info(t_service* tservice,
t_function* tfunction) {
-
+ (void) tservice;
string name_atom = "'" + tfunction->get_name() + "'";
diff --git a/compiler/cpp/src/generate/t_generator.h b/compiler/cpp/src/generate/t_generator.h
index 458922ff7..4de056883 100644
--- a/compiler/cpp/src/generate/t_generator.h
+++ b/compiler/cpp/src/generate/t_generator.h
@@ -73,7 +73,10 @@ class t_generator {
* Will be called with subnamespace, i.e. is_valid_namespace("twisted")
* will be called for the above example.
*/
- static bool is_valid_namespace(const std::string& sub_namespace) { return false; }
+ static bool is_valid_namespace(const std::string& sub_namespace) {
+ (void) sub_namespace;
+ return false;
+ }
/**
* Escape string to use one in generated sources.
@@ -102,7 +105,9 @@ class t_generator {
virtual void generate_typedef (t_typedef* ttypedef) = 0;
virtual void generate_enum (t_enum* tenum) = 0;
- virtual void generate_const (t_const* tconst) {}
+ virtual void generate_const (t_const* tconst) {
+ (void) tconst;
+ }
virtual void generate_struct (t_struct* tstruct) = 0;
virtual void generate_service (t_service* tservice) = 0;
virtual void generate_xception (t_struct* txception) {
diff --git a/compiler/cpp/src/generate/t_hs_generator.cc b/compiler/cpp/src/generate/t_hs_generator.cc
index 36eb36ca1..fcc055a6b 100644
--- a/compiler/cpp/src/generate/t_hs_generator.cc
+++ b/compiler/cpp/src/generate/t_hs_generator.cc
@@ -43,6 +43,8 @@ class t_hs_generator : public t_oop_generator {
const string& option_string)
: t_oop_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-hs";
}
@@ -517,6 +519,7 @@ void t_hs_generator::generate_hs_struct_definition(ofstream& out,
t_struct* tstruct,
bool is_exception,
bool helper) {
+ (void) helper;
string tname = type_name(tstruct);
string name = tstruct->get_name();
@@ -992,6 +995,7 @@ void t_hs_generator::generate_service_server(t_service* tservice) {
*/
void t_hs_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
+ (void) tservice;
// Open function
string funname = decapitalize(tfunction->get_name());
indent(f_service_) << "process_" << funname << " (seqid, iprot, oprot, handler) = do" << endl;
@@ -1098,6 +1102,7 @@ void t_hs_generator::generate_process_function(t_service* tservice,
void t_hs_generator::generate_deserialize_field(ofstream &out,
t_field* tfield,
string prefix) {
+ (void) prefix;
t_type* type = tfield->get_type();
generate_deserialize_type(out,type);
}
diff --git a/compiler/cpp/src/generate/t_html_generator.cc b/compiler/cpp/src/generate/t_html_generator.cc
index d1b2f055d..881e0f864 100644
--- a/compiler/cpp/src/generate/t_html_generator.cc
+++ b/compiler/cpp/src/generate/t_html_generator.cc
@@ -44,6 +44,8 @@ class t_html_generator : public t_generator {
const std::string& option_string)
: t_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-html";
escape_.clear();
escape_['&'] = "&amp;";
diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc
index 94717744c..7acd9aca7 100644
--- a/compiler/cpp/src/generate/t_java_generator.cc
+++ b/compiler/cpp/src/generate/t_java_generator.cc
@@ -44,6 +44,7 @@ class t_java_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
iter = parsed_options.find("beans");
@@ -356,7 +357,9 @@ void t_java_generator::close_generator() {}
*
* @param ttypedef The type definition
*/
-void t_java_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_java_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Enums are a class with a set of static constants.
@@ -585,6 +588,7 @@ void t_java_generator::print_const_value(std::ofstream& out, string name, t_type
}
string t_java_generator::render_const_value(ofstream& out, string name, t_type* type, t_const_value* value) {
+ (void) name;
type = get_true_type(type);
std::ostringstream render;
@@ -978,6 +982,7 @@ void t_java_generator::generate_get_field_desc(ofstream& out, t_struct* tstruct)
}
void t_java_generator::generate_get_struct_desc(ofstream& out, t_struct* tstruct) {
+ (void) tstruct;
indent(out) << "@Override" << endl;
indent(out) << "protected TStruct getStructDesc() {" << endl;
indent(out) << " return STRUCT_DESC;" << endl;
@@ -1013,6 +1018,7 @@ void t_java_generator::generate_union_comparisons(ofstream& out, t_struct* tstru
}
void t_java_generator::generate_union_hashcode(ofstream& out, t_struct* tstruct) {
+ (void) tstruct;
if (gen_hash_code_) {
indent(out) << "@Override" << endl;
indent(out) << "public int hashCode() {" << endl;
@@ -1653,6 +1659,7 @@ void t_java_generator::generate_java_struct_result_writer(ofstream& out,
}
void t_java_generator::generate_java_struct_field_by_id(ofstream& out, t_struct* tstruct) {
+ (void) tstruct;
indent(out) << "public _Fields fieldForId(int fieldId) {" << endl;
indent(out) << " return _Fields.findByThriftId(fieldId);" << endl;
indent(out) << "}" << endl << endl;
@@ -2704,6 +2711,7 @@ void t_java_generator::generate_function_helpers(t_function* tfunction) {
*/
void t_java_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
+ (void) tservice;
// Open class
indent(f_service_) <<
"private class " << tfunction->get_name() << " implements ProcessFunction {" << endl;
@@ -3141,6 +3149,7 @@ void t_java_generator::generate_serialize_field(ofstream& out,
void t_java_generator::generate_serialize_struct(ofstream& out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
out <<
indent() << prefix << ".write(oprot);" << endl;
}
@@ -3228,6 +3237,7 @@ void t_java_generator::generate_serialize_map_element(ofstream& out,
t_map* tmap,
string iter,
string map) {
+ (void) map;
t_field kfield(tmap->get_key_type(), iter + ".getKey()");
generate_serialize_field(out, &kfield, "");
t_field vfield(tmap->get_val_type(), iter + ".getValue()");
@@ -3474,6 +3484,7 @@ string t_java_generator::argument_list(t_struct* tstruct, bool include_types) {
}
string t_java_generator::async_argument_list(t_function* tfunct, t_struct* tstruct, t_type* ttype, bool include_types) {
+ (void) ttype;
string result = "";
const vector<t_field*>& fields = tstruct->get_members();
vector<t_field*>::const_iterator f_iter;
@@ -3721,6 +3732,7 @@ void t_java_generator::generate_deep_copy_container(ofstream &out, std::string s
}
void t_java_generator::generate_deep_copy_non_container(ofstream& out, std::string source_name, std::string dest_name, t_type* type) {
+ (void) dest_name;
if (type->is_base_type() || type->is_enum() || type->is_typedef()) {
if (((t_base_type*)type)->is_binary()) {
out << "TBaseHelper.copyBinary(" << source_name << ");" << endl;
diff --git a/compiler/cpp/src/generate/t_javame_generator.cc b/compiler/cpp/src/generate/t_javame_generator.cc
index ff2d285a9..b390239c7 100644
--- a/compiler/cpp/src/generate/t_javame_generator.cc
+++ b/compiler/cpp/src/generate/t_javame_generator.cc
@@ -44,6 +44,8 @@ class t_javame_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
out_dir_base_ = "gen-javame";
}
@@ -313,7 +315,9 @@ void t_javame_generator::close_generator() {}
*
* @param ttypedef The type definition
*/
-void t_javame_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_javame_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Enums are a class with a set of static constants.
@@ -537,6 +541,7 @@ void t_javame_generator::print_const_value(std::ofstream& out, string name, t_ty
}
string t_javame_generator::render_const_value(ofstream& out, string name, t_type* type, t_const_value* value) {
+ (void) name;
type = get_true_type(type);
std::ostringstream render;
@@ -934,6 +939,7 @@ void t_javame_generator::generate_get_field_desc(ofstream& out, t_struct* tstruc
}
void t_javame_generator::generate_get_struct_desc(ofstream& out, t_struct* tstruct) {
+ (void) tstruct;
indent(out) << "protected TStruct getStructDesc() {" << endl;
indent(out) << " return STRUCT_DESC;" << endl;
indent(out) << "}" << endl;
@@ -967,6 +973,7 @@ void t_javame_generator::generate_union_comparisons(ofstream& out, t_struct* tst
}
void t_javame_generator::generate_union_hashcode(ofstream& out, t_struct* tstruct) {
+ (void) tstruct;
indent(out) << "/**" << endl;
indent(out) << " * If you'd like this to perform more respectably, use the hashcode generator option." << endl;
indent(out) << " */" << endl;
@@ -1553,7 +1560,7 @@ void t_javame_generator::generate_reflection_setters(ostringstream& out, t_type*
}
void t_javame_generator::generate_generic_field_getters_setters(std::ofstream& out, t_struct* tstruct) {
-
+ (void) out;
std::ostringstream getter_stream;
std::ostringstream setter_stream;
@@ -2313,6 +2320,7 @@ void t_javame_generator::generate_function_helpers(t_function* tfunction) {
*/
void t_javame_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
+ (void) tservice;
// Open class
indent(f_service_) <<
"private class " << tfunction->get_name() << " implements ProcessFunction {" << endl;
@@ -2754,6 +2762,7 @@ void t_javame_generator::generate_serialize_field(ofstream& out,
void t_javame_generator::generate_serialize_struct(ofstream& out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
out <<
indent() << prefix << ".write(oprot);" << endl;
}
@@ -2881,6 +2890,8 @@ void t_javame_generator::generate_serialize_list_element(ofstream& out,
* @return Java type name, i.e. Vector
*/
string t_javame_generator::type_name(t_type* ttype, bool in_container, bool in_init, bool skip_generic) {
+ (void) in_init;
+ (void) skip_generic;
// In Java typedefs are just resolved to their real type
ttype = get_true_type(ttype);
string prefix;
diff --git a/compiler/cpp/src/generate/t_js_generator.cc b/compiler/cpp/src/generate/t_js_generator.cc
index 921cbb4ef..bb1033cf2 100644
--- a/compiler/cpp/src/generate/t_js_generator.cc
+++ b/compiler/cpp/src/generate/t_js_generator.cc
@@ -41,7 +41,8 @@ class t_js_generator : public t_oop_generator {
const std::map<std::string, std::string>& parsed_options,
const std::string& option_string) :
t_oop_generator(program) {
-
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-js";
}
@@ -262,7 +263,9 @@ void t_js_generator::close_generator() {
*
* @param ttypedef The type definition
*/
-void t_js_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_js_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Generates code for an enumerated type. Since define is expensive to lookup
@@ -642,7 +645,7 @@ void t_js_generator::generate_service(t_service* tservice) {
* @param tservice The service to generate a server for.
*/
void t_js_generator::generate_service_processor(t_service* tservice) {
-
+ (void) tservice;
}
/**
@@ -652,7 +655,8 @@ void t_js_generator::generate_service_processor(t_service* tservice) {
*/
void t_js_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
-
+ (void) tservice;
+ (void) tfunction;
}
/**
@@ -705,14 +709,14 @@ void t_js_generator::generate_js_function_helpers(t_function* tfunction) {
* @param tservice The service to generate a header definition for
*/
void t_js_generator::generate_service_interface(t_service* tservice) {
-
+ (void) tservice;
}
/**
* Generates a REST interface
*/
void t_js_generator::generate_service_rest(t_service* tservice) {
-
+ (void) tservice;
}
/**
@@ -904,6 +908,7 @@ void t_js_generator::generate_deserialize_field(ofstream &out,
t_field* tfield,
string prefix,
bool inclass) {
+ (void) inclass;
t_type* type = get_true_type(tfield->get_type());
if (type->is_void()) {
@@ -1207,7 +1212,8 @@ void t_js_generator::generate_serialize_field(ofstream &out,
void t_js_generator::generate_serialize_struct(ofstream &out,
t_struct* tstruct,
string prefix) {
- indent(out) << prefix << ".write(output)" << endl;
+ (void) tstruct;
+ indent(out) << prefix << ".write(output)" << endl;
}
/**
diff --git a/compiler/cpp/src/generate/t_ocaml_generator.cc b/compiler/cpp/src/generate/t_ocaml_generator.cc
index 5ed4a99bc..18a8072a5 100644
--- a/compiler/cpp/src/generate/t_ocaml_generator.cc
+++ b/compiler/cpp/src/generate/t_ocaml_generator.cc
@@ -43,6 +43,8 @@ class t_ocaml_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-ocaml";
}
@@ -1283,6 +1285,7 @@ void t_ocaml_generator::generate_service_server(t_service* tservice) {
*/
void t_ocaml_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
+ (void) tservice;
// Open function
indent(f_service_) <<
"method private process_" << tfunction->get_name() <<
@@ -1624,6 +1627,7 @@ void t_ocaml_generator::generate_serialize_field(ofstream &out,
void t_ocaml_generator::generate_serialize_struct(ofstream &out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
indent(out) << prefix << "#write(oprot)";
}
diff --git a/compiler/cpp/src/generate/t_perl_generator.cc b/compiler/cpp/src/generate/t_perl_generator.cc
index 33589c213..e1796dc6f 100644
--- a/compiler/cpp/src/generate/t_perl_generator.cc
+++ b/compiler/cpp/src/generate/t_perl_generator.cc
@@ -43,6 +43,8 @@ class t_perl_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-perl";
escape_['$'] = "\\$";
escape_['@'] = "\\@";
@@ -291,7 +293,9 @@ void t_perl_generator::close_generator() {
*
* @param ttypedef The type definition
*/
-void t_perl_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_perl_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Generates code for an enumerated type. Since define is expensive to lookup
@@ -1254,6 +1258,7 @@ void t_perl_generator::generate_deserialize_field(ofstream &out,
t_field* tfield,
string prefix,
bool inclass) {
+ (void) inclass;
t_type* type = get_true_type(tfield->get_type());
if (type->is_void()) {
@@ -1556,7 +1561,8 @@ void t_perl_generator::generate_serialize_field(ofstream &out,
void t_perl_generator::generate_serialize_struct(ofstream &out,
t_struct* tstruct,
string prefix) {
- indent(out) <<
+ (void) tstruct;
+ indent(out) <<
"$xfer += $" << prefix << "->write($output);" << endl;
}
diff --git a/compiler/cpp/src/generate/t_php_generator.cc b/compiler/cpp/src/generate/t_php_generator.cc
index 200d89a23..d1b33a96a 100644
--- a/compiler/cpp/src/generate/t_php_generator.cc
+++ b/compiler/cpp/src/generate/t_php_generator.cc
@@ -42,6 +42,7 @@ class t_php_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
iter = parsed_options.find("inlined");
@@ -317,7 +318,9 @@ void t_php_generator::close_generator() {
*
* @param ttypedef The type definition
*/
-void t_php_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_php_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Generates code for an enumerated type. Since define is expensive to lookup
@@ -2018,6 +2021,7 @@ void t_php_generator::generate_serialize_field(ofstream &out,
void t_php_generator::generate_serialize_struct(ofstream &out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
indent(out) <<
"$xfer += $" << prefix << "->write($output);" << endl;
}
diff --git a/compiler/cpp/src/generate/t_py_generator.cc b/compiler/cpp/src/generate/t_py_generator.cc
index bdd0c2911..cb1950fb7 100644
--- a/compiler/cpp/src/generate/t_py_generator.cc
+++ b/compiler/cpp/src/generate/t_py_generator.cc
@@ -44,6 +44,7 @@ class t_py_generator : public t_generator {
const std::string& option_string)
: t_generator(program)
{
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
iter = parsed_options.find("new_style");
@@ -365,7 +366,9 @@ void t_py_generator::close_generator() {
*
* @param ttypedef The type definition
*/
-void t_py_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_py_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Generates code for an enumerated type. Done using a class to scope
@@ -562,7 +565,7 @@ void t_py_generator::generate_py_struct_definition(ofstream& out,
t_struct* tstruct,
bool is_exception,
bool is_result) {
-
+ (void) is_result;
const vector<t_field*>& members = tstruct->get_members();
const vector<t_field*>& sorted_members = tstruct->get_sorted_members();
vector<t_field*>::const_iterator m_iter;
@@ -1572,6 +1575,7 @@ void t_py_generator::generate_service_server(t_service* tservice) {
*/
void t_py_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
+ (void) tservice;
// Open function
indent(f_service_) <<
"def process_" << tfunction->get_name() <<
@@ -1767,6 +1771,7 @@ void t_py_generator::generate_deserialize_field(ofstream &out,
t_field* tfield,
string prefix,
bool inclass) {
+ (void) inclass;
t_type* type = get_true_type(tfield->get_type());
if (type->is_void()) {
@@ -2040,6 +2045,7 @@ void t_py_generator::generate_serialize_field(ofstream &out,
void t_py_generator::generate_serialize_struct(ofstream &out,
t_struct* tstruct,
string prefix) {
+ (void) tstruct;
indent(out) <<
prefix << ".write(oprot)" << endl;
}
diff --git a/compiler/cpp/src/generate/t_rb_generator.cc b/compiler/cpp/src/generate/t_rb_generator.cc
index 770f8e768..c9db29ac3 100644
--- a/compiler/cpp/src/generate/t_rb_generator.cc
+++ b/compiler/cpp/src/generate/t_rb_generator.cc
@@ -49,6 +49,8 @@ class t_rb_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-rb";
}
@@ -282,7 +284,9 @@ void t_rb_generator::close_generator() {
*
* @param ttypedef The type definition
*/
-void t_rb_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_rb_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
/**
* Generates code for an enumerated type. Done using a class to scope
@@ -511,6 +515,7 @@ void t_rb_generator::generate_rb_struct(std::ofstream& out, t_struct* tstruct, b
* Generates a ruby union
*/
void t_rb_generator::generate_rb_union(std::ofstream& out, t_struct* tstruct, bool is_exception = false) {
+ (void) is_exception;
generate_rdoc(out, tstruct);
indent(out) << "class " << type_name(tstruct) << " < ::Thrift::Union" << endl;
@@ -933,6 +938,7 @@ void t_rb_generator::generate_service_server(t_service* tservice) {
*/
void t_rb_generator::generate_process_function(t_service* tservice,
t_function* tfunction) {
+ (void) tservice;
// Open function
indent(f_service_) <<
"def process_" << tfunction->get_name() <<
diff --git a/compiler/cpp/src/generate/t_st_generator.cc b/compiler/cpp/src/generate/t_st_generator.cc
index fd8f035d4..6ca370158 100644
--- a/compiler/cpp/src/generate/t_st_generator.cc
+++ b/compiler/cpp/src/generate/t_st_generator.cc
@@ -49,6 +49,8 @@ class t_st_generator : public t_oop_generator {
const std::string& option_string)
: t_oop_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-st";
}
@@ -240,7 +242,9 @@ string t_st_generator::generated_category() {
*
* @param ttypedef The type definition
*/
-void t_st_generator::generate_typedef(t_typedef* ttypedef) {}
+void t_st_generator::generate_typedef(t_typedef* ttypedef) {
+ (void) ttypedef;
+}
void t_st_generator::st_class_def(std::ofstream &out, string name) {
out << "Object subclass: #" << prefix(name) << endl;
diff --git a/compiler/cpp/src/generate/t_xsd_generator.cc b/compiler/cpp/src/generate/t_xsd_generator.cc
index c343b9a8a..923ec705a 100644
--- a/compiler/cpp/src/generate/t_xsd_generator.cc
+++ b/compiler/cpp/src/generate/t_xsd_generator.cc
@@ -41,6 +41,8 @@ class t_xsd_generator : public t_generator {
const std::string& option_string)
: t_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
out_dir_base_ = "gen-xsd";
}
@@ -58,7 +60,9 @@ class t_xsd_generator : public t_generator {
*/
void generate_typedef(t_typedef* ttypedef);
- void generate_enum(t_enum* tenum) {}
+ void generate_enum(t_enum* tenum) {
+ (void) tenum;
+ }
void generate_service(t_service* tservice);
void generate_struct(t_struct* tstruct);