"public function " << tstruct->get_name() << "() {" << endl;
indent_up();
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
- t_type* t = get_true_type((*m_iter)->get_type());
if ((*m_iter)->get_value() != NULL) {
indent(out) << "this._" << (*m_iter)->get_name() << " = " << (*m_iter)->get_value()->get_integer() << ";" <<
endl;
indent() << "T_GENERIC_PROTOCOL(this, oprot, _oprot);" << endl << endl;
}
+ if (tfunction->is_oneway()) {
+ out <<
+ indent() << "(void) seqid;" << endl <<
+ indent() << "(void) oprot;" << endl;
+ }
+
out <<
indent() << tservice->get_name() + "_" + tfunction->get_name() + "_args" << " args;" << endl <<
indent() << "void* ctx = NULL;" << endl <<
? "()"
: ("(" + type_name(ttype) + " const& _return)"));
if (has_xceptions) {
- exn_cob = ", std::tr1::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob";
+ exn_cob = ", std::tr1::function<void(::apache::thrift::TDelayedException* _throw)> /* exn_cob */";
}
} else {
throw "UNKNOWN STYLE";
const std::string& option_string)
: t_generator(program)
{
+ (void) parsed_options;
+ (void) option_string;
std::map<std::string, std::string>::const_iterator iter;
out_dir_base_ = "gen-go";
}
bool is_exception,
bool is_result) {
+ (void) is_exception;
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;
t_struct* tstruct,
const string& tstruct_name,
bool is_result) {
+ (void) is_result;
const vector<t_field*>& fields = tstruct->get_members();
vector<t_field*>::const_iterator f_iter;
string escaped_tstruct_name(escape_string(tstruct->get_name()));
string err,
bool inclass,
bool coerceData) {
+ (void) inclass;
+ (void) coerceData;
t_type* orig_type = tfield->get_type();
t_type* type = get_true_type(orig_type);
string name(prefix + publicize(variable_name_to_go_name(tfield->get_name())));
bool declare,
string prefix,
string err) {
+ (void) err;
string err2(tmp("err"));
string eq(" := ");
if(!declare) {
bool declare,
string prefix,
string err) {
+ (void) declare;
+ (void) err;
string key = tmp("_key");
string val = tmp("_val");
t_field fkey(tmap->get_key_type(), key);
bool declare,
string prefix,
string err) {
+ (void) declare;
string elem = tmp("_elem");
t_field felem(tset->get_elem_type(), elem);
bool declare,
string prefix,
string err) {
+ (void) declare;
string elem = tmp("_elem");
t_field felem(tlist->get_elem_type(), elem);
}
-THRIFT_REGISTER_GENERATOR(go, "Go", "");
+THRIFT_REGISTER_GENERATOR(go, "Go", "")
// generates java method to serialize (in the Java sense) the object
void t_java_generator::generate_java_struct_write_object(ofstream& out, t_struct* tstruct) {
+ (void) tstruct;
indent(out) << "private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {" << endl;
indent(out) << " try {" << endl;
indent(out) << " write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));" << endl;
bool TEvhttpClientChannel::sendMessage(
const VoidCallback& cob, apache::thrift::transport::TMemoryBuffer* message) {
+ (void) cob;
+ (void) message;
abort(); // XXX
}
bool TEvhttpClientChannel::recvMessage(
const VoidCallback& cob, apache::thrift::transport::TMemoryBuffer* message) {
+ (void) cob;
+ (void) message;
abort(); // XXX
}
void TEvhttpServer::complete(RequestContext* ctx, bool success) {
+ (void) success;
std::auto_ptr<RequestContext> ptr(ctx);
int code = 200;
// both certificate and access manager are present
string host;
- sockaddr_storage sa = {};
+ sockaddr_storage sa;
socklen_t saLength = sizeof(sa);
if (getpeername(socket_, (sockaddr*)&sa, &saLength) != 0) {
* Default implementation of AccessManager
*/
Decision DefaultClientAccessManager::verify(const sockaddr_storage& sa)
- throw() { return SKIP; }
+ throw() {
+ (void) sa;
+ return SKIP;
+}
Decision DefaultClientAccessManager::verify(const string& host,
const char* name,
* @param password Pass collected password to OpenSSL
* @param size Maximum length of password including NULL character
*/
- virtual void getPassword(std::string& password, int size) { }
+ virtual void getPassword(std::string& /* password */, int /* size */) {}
private:
bool server_;
boost::shared_ptr<AccessManager> access_;
enum Decision {
DENY = -1, // deny access
SKIP = 0, // cannot make decision, move on to next (if any)
- ALLOW = 1, // allow access
+ ALLOW = 1 // allow access
};
/**
* Destructor
* @param sa Peer IP address
* @return True if the peer is trusted, false otherwise
*/
- virtual Decision verify(const sockaddr_storage& sa) throw() { return DENY; }
+ virtual Decision verify(const sockaddr_storage& /* sa */ ) throw() { return DENY; }
/**
* Determine whether the peer should be granted access or not. It's called
* every time a DNS subjectAltName/common name is extracted from peer's
*
* Note: The "name" parameter may be UTF8 encoded.
*/
- virtual Decision verify(const std::string& host, const char* name, int size)
+ virtual Decision verify(const std::string& /* host */, const char* /* name */, int /* size */)
throw() { return DENY; }
/**
* Determine whether the peer should be granted access or not. It's called
* @param size Length of the IP address
* @return True if the peer is trusted, false otherwise
*/
- virtual Decision verify(const sockaddr_storage& sa, const char* data, int size)
+ virtual Decision verify(const sockaddr_storage& /* sa */, const char* /* data */, int /* size */)
throw() { return DENY; }
};
int64_t echoI64(const int64_t arg) {return arg;}
void echoString(string& out, const string &arg) {
if (arg != "hello") {
- T_ERROR_ABORT("WRONG STRING!!!!");
+ T_ERROR_ABORT("WRONG STRING (%s)!!!!", arg.c_str());
}
out = arg;
}
int64_t echoI64(const int64_t arg) {return arg;}
void echoString(string& out, const string &arg) {
if (arg != "hello") {
- T_ERROR_ABORT("WRONG STRING!!!!");
+ T_ERROR_ABORT("WRONG STRING (%s)!!!!", arg.c_str());
}
out = arg;
}
}
static void testString_clientReturn(const char* host, int port, event_base *base, TProtocolFactory* protocolFactory, ThriftTestCobClient* client) {
+ (void) host;
+ (void) port;
+ (void) protocolFactory;
try {
string s;
client->recv_testString(s);
*/
printf("testDouble(-5.2098523)");
double dub = testClient.testDouble(-5.2098523);
- printf(" = %lf\n", dub);
+ printf(" = %f\n", dub);
/**
* STRUCT TEST
}
double testDouble(const double thing) {
- printf("testDouble(%lf)\n", thing);
+ printf("testDouble(%f)\n", thing);
return thing;
}
}
void testInsanity(map<UserId, map<Numberz::type,Insanity> > &insane, const Insanity &argument) {
+ (void) argument;
printf("testInsanity()\n");
Xtruct hello;
}
void testMulti(Xtruct &hello, const int8_t arg0, const int32_t arg1, const int64_t arg2, const std::map<int16_t, std::string> &arg3, const Numberz::type arg4, const UserId arg5) {
+ (void) arg3;
+ (void) arg4;
+ (void) arg5;
+
printf("testMulti()\n");
hello.string_thing = "Hello2";
class TestProcessorEventHandler : public TProcessorEventHandler {
virtual void* getContext(const char* fn_name, void* serverContext) {
+ (void) serverContext;
return new std::string(fn_name);
}
virtual void freeContext(void* ctx, const char* fn_name) {
+ (void) fn_name;
delete static_cast<std::string*>(ctx);
}
virtual void preRead(void* ctx, const char* fn_name) {
communicate("preRead", ctx, fn_name);
}
virtual void postRead(void* ctx, const char* fn_name, uint32_t bytes) {
+ (void) bytes;
communicate("postRead", ctx, fn_name);
}
virtual void preWrite(void* ctx, const char* fn_name) {
communicate("preWrite", ctx, fn_name);
}
virtual void postWrite(void* ctx, const char* fn_name, uint32_t bytes) {
+ (void) bytes;
communicate("postWrite", ctx, fn_name);
}
virtual void asyncComplete(void* ctx, const char* fn_name) {