remove unused variables
diff --git a/compiler/cpp/src/thrift/generate/t_erl_generator.cc b/compiler/cpp/src/thrift/generate/t_erl_generator.cc
index 587133f..12d91a7 100644
--- a/compiler/cpp/src/thrift/generate/t_erl_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_erl_generator.cc
@@ -415,7 +415,6 @@
}
void t_erl_generator::generate_type_metadata(std::string function_name, vector<string> names) {
- vector<string>::iterator s_iter;
size_t num_structs = names.size();
indent(f_types_file_) << function_name << "() ->\n";
@@ -947,7 +946,6 @@
void t_erl_generator::generate_service_metadata(t_service* tservice) {
export_string("function_names", 0);
vector<t_function*> functions = tservice->get_functions();
- vector<t_function*>::iterator f_iter;
size_t num_functions = functions.size();
indent(f_service_) << "function_names() -> " << endl;
diff --git a/compiler/cpp/src/thrift/generate/t_go_generator.cc b/compiler/cpp/src/thrift/generate/t_go_generator.cc
index 5ada4fa..ec16b87 100644
--- a/compiler/cpp/src/thrift/generate/t_go_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_go_generator.cc
@@ -2153,7 +2153,6 @@
<< (*f_iter)->get_name() << "(";
t_struct* arg_struct = (*f_iter)->get_arglist();
const std::vector<t_field*>& args = arg_struct->get_members();
- vector<t_field*>::const_iterator a_iter;
std::vector<t_field*>::size_type num_args = args.size();
bool first = true;
@@ -2308,7 +2307,6 @@
for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
t_struct* arg_struct = (*f_iter)->get_arglist();
const std::vector<t_field*>& args = arg_struct->get_members();
- vector<t_field*>::const_iterator a_iter;
std::vector<t_field*>::size_type num_args = args.size();
string funcName((*f_iter)->get_name());
string pubName(publicize(funcName));
@@ -2693,7 +2691,6 @@
// t_struct* xs = tfunction->get_xceptions();
// const std::vector<t_field*>& xceptions = xs->get_members();
- vector<t_field*>::const_iterator x_iter;
f_types_ << indent() << "type " << processorName << " struct {" << endl;
f_types_ << indent() << " handler " << publicize(tservice->get_name()) << endl;
f_types_ << indent() << "}" << endl << endl;
diff --git a/compiler/cpp/src/thrift/generate/t_hs_generator.cc b/compiler/cpp/src/thrift/generate/t_hs_generator.cc
index ce7cd0c..8f6d4b0 100644
--- a/compiler/cpp/src/thrift/generate/t_hs_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_hs_generator.cc
@@ -590,7 +590,6 @@
string tname = type_name(tstruct);
string name = tstruct->get_name();
const vector<t_field*>& members = tstruct->get_members();
- vector<t_field*>::const_iterator m_iter;
indent(out) << "instance QC.Arbitrary " << tname << " where " << endl;
indent_up();
@@ -654,7 +653,6 @@
*/
void t_hs_generator::generate_hs_struct_reader(ostream& out, t_struct* tstruct) {
const vector<t_field*>& fields = tstruct->get_members();
- vector<t_field*>::const_iterator f_iter;
string sname = type_name(tstruct);
string id = tmp("_id");
@@ -725,7 +723,6 @@
void t_hs_generator::generate_hs_struct_writer(ostream& out, t_struct* tstruct) {
string name = type_name(tstruct);
const vector<t_field*>& fields = tstruct->get_sorted_members();
- vector<t_field*>::const_iterator f_iter;
string str = tmp("_str");
string f = tmp("_f");
string v = tmp("_v");
@@ -909,7 +906,6 @@
void t_hs_generator::generate_hs_typemap(ostream& out, t_struct* tstruct) {
string name = type_name(tstruct);
const vector<t_field*>& fields = tstruct->get_sorted_members();
- vector<t_field*>::const_iterator f_iter;
indent(out) << "typemap_" << name << " :: T.TypeMap" << endl;
indent(out) << "typemap_" << name << " = Map.fromList [";
diff --git a/compiler/cpp/src/thrift/generate/t_py_generator.cc b/compiler/cpp/src/thrift/generate/t_py_generator.cc
index f0a153c..e46207a 100644
--- a/compiler/cpp/src/thrift/generate/t_py_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_py_generator.cc
@@ -1624,7 +1624,6 @@
<< (*f_iter)->get_name() << "(";
t_struct* arg_struct = (*f_iter)->get_arglist();
const std::vector<t_field*>& args = arg_struct->get_members();
- vector<t_field*>::const_iterator a_iter;
std::vector<t_field*>::size_type num_args = args.size();
bool first = true;
for (std::vector<t_field*>::size_type i = 0; i < num_args; ++i) {
@@ -1730,7 +1729,6 @@
t_struct* arg_struct = (*f_iter)->get_arglist();
const std::vector<t_field*>& args = arg_struct->get_members();
- vector<t_field*>::const_iterator a_iter;
std::vector<t_field*>::size_type num_args = args.size();
f_remote << "if cmd == '" << (*f_iter)->get_name() << "':" << endl;
diff --git a/lib/c_glib/test/testbufferedtransport.c b/lib/c_glib/test/testbufferedtransport.c
index c6e6b58..d01806d 100755
--- a/lib/c_glib/test/testbufferedtransport.c
+++ b/lib/c_glib/test/testbufferedtransport.c
@@ -175,11 +175,8 @@
static void
thrift_socket_server_open (const int port, int times)
{
- int bytes = 0;
ThriftServerTransport *transport = NULL;
ThriftTransport *client = NULL;
- guchar buf[10]; /* a buffer */
- guchar match[10] = TEST_DATA;
int i;
ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
"port", port, NULL);
diff --git a/lib/c_glib/test/testframedtransport.c b/lib/c_glib/test/testframedtransport.c
index 45397ce..008e61e 100755
--- a/lib/c_glib/test/testframedtransport.c
+++ b/lib/c_glib/test/testframedtransport.c
@@ -249,11 +249,8 @@
static void
thrift_socket_server_open (const int port, int times)
{
- int bytes = 0;
ThriftServerTransport *transport = NULL;
ThriftTransport *client = NULL;
- guchar buf[10]; /* a buffer */
- guchar match[10] = TEST_DATA;
int i;
ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
diff --git a/lib/c_glib/test/testtransportsocket.c b/lib/c_glib/test/testtransportsocket.c
index fedbad6..89c61b9 100755
--- a/lib/c_glib/test/testtransportsocket.c
+++ b/lib/c_glib/test/testtransportsocket.c
@@ -291,11 +291,8 @@
static void
thrift_socket_server_open (const int port, int times)
{
- int bytes = 0;
ThriftServerTransport *transport = NULL;
ThriftTransport *client = NULL;
- guchar buf[10]; /* a buffer */
- guchar match[10] = TEST_DATA;
int i;
ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
"port", port, NULL);
diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
index 40eb7ad..4576fa1 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
@@ -49,7 +49,6 @@
static const uint8_t kJSONElemSeparator = ',';
static const uint8_t kJSONBackslash = '\\';
static const uint8_t kJSONStringDelimiter = '"';
-static const uint8_t kJSONZeroChar = '0';
static const uint8_t kJSONEscapeChar = 'u';
static const std::string kJSONEscapePrefix("\\u00");