设置 UNUSED,修复编译警告
This commit is contained in:
6
cache/src/tango_cache_client.cpp
vendored
6
cache/src/tango_cache_client.cpp
vendored
@@ -799,7 +799,7 @@ static void check_multi_info(CURLM *multi)
|
||||
static void libevent_socket_event_cb(int fd, short action, void *userp)
|
||||
{
|
||||
struct tango_cache_instance *instance = (struct tango_cache_instance *)userp; //from event_assign
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
int what, still_running;
|
||||
|
||||
what = ((action&EV_READ)?CURL_CSELECT_IN:0) | ((action & EV_WRITE)?CURL_CSELECT_OUT:0);
|
||||
@@ -819,7 +819,7 @@ static void libevent_socket_event_cb(int fd, short action, void *userp)
|
||||
static void libevent_timer_event_cb(int fd, short kind, void *userp)
|
||||
{
|
||||
struct tango_cache_instance *instance = (struct tango_cache_instance *)userp;
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
int still_running;
|
||||
|
||||
rc = curl_multi_socket_action(instance->multi_hd, CURL_SOCKET_TIMEOUT, 0, &still_running);
|
||||
@@ -866,7 +866,7 @@ static int curl_timer_function_cb(CURLM *multi, long timeout_ms, void *userp)
|
||||
{
|
||||
struct tango_cache_instance *instance = (struct tango_cache_instance *)userp;
|
||||
struct timeval timeout;
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
int still_running;
|
||||
|
||||
timeout.tv_sec = timeout_ms/1000;
|
||||
|
||||
18
cache/src/tango_cache_transfer.cpp
vendored
18
cache/src/tango_cache_transfer.cpp
vendored
@@ -113,7 +113,7 @@ static size_t curl_put_multipart_send_cb(void *ptr, size_t size, size_t count, v
|
||||
//return value: <0:fail; =0: not exec; >0: OK
|
||||
static int http_put_bodypart_request_evbuf(struct tango_cache_ctx *ctx, bool full)
|
||||
{
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
if(NULL == (ctx->curl=curl_easy_init()))
|
||||
@@ -177,7 +177,7 @@ static size_t curl_response_body_save_cb(void *ptr, size_t size, size_t count, v
|
||||
|
||||
int curl_get_minio_uploadID(struct tango_cache_ctx *ctx)
|
||||
{
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
if(NULL == (ctx->curl=curl_easy_init()))
|
||||
@@ -204,7 +204,7 @@ int curl_get_minio_uploadID(struct tango_cache_ctx *ctx)
|
||||
|
||||
int cache_delete_minio_object(struct tango_cache_ctx *ctx, bool call_back)
|
||||
{
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
ctx->instance->statistic.del_recv_num += 1;
|
||||
@@ -231,7 +231,7 @@ int cache_delete_minio_object(struct tango_cache_ctx *ctx, bool call_back)
|
||||
//return value: true-<2D>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>false-δ<><CEB4><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
||||
bool cache_cancel_upload_minio(struct tango_cache_ctx *ctx)
|
||||
{
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
if(NULL == (ctx->curl=curl_easy_init()))
|
||||
@@ -256,7 +256,7 @@ bool cache_cancel_upload_minio(struct tango_cache_ctx *ctx)
|
||||
bool cache_kick_combine_minio(struct tango_cache_ctx *ctx)
|
||||
{
|
||||
int len=0;
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
if(NULL == (ctx->curl=curl_easy_init()))
|
||||
@@ -509,7 +509,7 @@ void tango_cache_curl_put_done(struct tango_cache_ctx *ctx, CURLcode res, long r
|
||||
|
||||
int http_put_complete_part_data(struct tango_cache_ctx *ctx, enum PUT_MEMORY_COPY_WAY way, const char *data, size_t size, bool callback)
|
||||
{
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
if(NULL == (ctx->curl=curl_easy_init()))
|
||||
@@ -646,7 +646,7 @@ void tango_cache_curl_muldel_done(struct tango_cache_ctx *ctx, CURLcode res, lon
|
||||
|
||||
int do_tango_cache_multi_delete(struct tango_cache_ctx *ctx, bool callback)
|
||||
{
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
ctx->instance->statistic.del_recv_num += ctx->del.succ_num;
|
||||
@@ -799,7 +799,7 @@ static size_t curl_get_response_header_cb(void *ptr, size_t size, size_t count,
|
||||
}
|
||||
if(ctx->res_code == 0) //<2F>״<EFBFBD>Ӧ<EFBFBD><D3A6>ʱ<EFBFBD>ȿ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>200
|
||||
{
|
||||
CURLcode code = curl_easy_getinfo(ctx->curl, CURLINFO_RESPONSE_CODE, &ctx->res_code);
|
||||
UNUSED CURLcode code = curl_easy_getinfo(ctx->curl, CURLINFO_RESPONSE_CODE, &ctx->res_code);
|
||||
if(!check_get_result_code(ctx, code, ctx->res_code))
|
||||
{
|
||||
return raw_len;
|
||||
@@ -892,7 +892,7 @@ void tango_cache_curl_get_done(struct tango_cache_ctx *ctx, CURLcode res, long r
|
||||
|
||||
static int tango_cache_fetch_minio(struct tango_cache_ctx *ctx)
|
||||
{
|
||||
CURLMcode rc;
|
||||
UNUSED CURLMcode rc;
|
||||
char minio_url[256];
|
||||
|
||||
if(NULL == (ctx->curl=curl_easy_init()))
|
||||
|
||||
@@ -1033,14 +1033,14 @@ const char* ssl_stream_dump_info(struct ssl_stream *stream, char* buffer, size_t
|
||||
static void ssl_stream_set_cmsg_string(struct ssl_stream* stream, enum tfe_cmsg_tlv_type type, const char* value_str)
|
||||
{
|
||||
struct tfe_cmsg* cmsg=tfe_stream_get0_cmsg(stream->tcp_stream);
|
||||
int ret=tfe_cmsg_set(cmsg, type, (const unsigned char*)value_str, (uint16_t)strlen(value_str));
|
||||
UNUSED int ret=tfe_cmsg_set(cmsg, type, (const unsigned char*)value_str, (uint16_t)strlen(value_str));
|
||||
assert(ret==0);
|
||||
return;
|
||||
}
|
||||
static void ssl_stream_set_cmsg_integer(struct ssl_stream* stream, enum tfe_cmsg_tlv_type type, uint64_t value_int)
|
||||
{
|
||||
struct tfe_cmsg* cmsg=tfe_stream_get0_cmsg(stream->tcp_stream);
|
||||
int ret=tfe_cmsg_set(cmsg, type, (const unsigned char*)&value_int, (uint16_t)sizeof(value_int));
|
||||
UNUSED int ret=tfe_cmsg_set(cmsg, type, (const unsigned char*)&value_int, (uint16_t)sizeof(value_int));
|
||||
assert(ret==0);
|
||||
return;
|
||||
}
|
||||
@@ -1954,7 +1954,7 @@ void ssl_async_downstream_create(struct future * f, struct ssl_mgr * mgr, struct
|
||||
* with the older SSL_shutdown() semantics, not exposing WANT_READ/WRITE
|
||||
* may or may not work.
|
||||
*/
|
||||
static struct ssl_shutdown_ctx * ssl_shutdown_ctx_new(struct ssl_stream * s_stream, struct event_base * evbase)
|
||||
UNUSED static struct ssl_shutdown_ctx * ssl_shutdown_ctx_new(struct ssl_stream * s_stream, struct event_base * evbase)
|
||||
{
|
||||
struct ssl_shutdown_ctx * ctx = ALLOC(struct ssl_shutdown_ctx, 1);
|
||||
ctx->evbase = evbase;
|
||||
@@ -2094,7 +2094,7 @@ complete:
|
||||
*/
|
||||
void ssl_stream_free_and_close_fd(struct ssl_stream * s_stream, struct event_base * evbase, struct bufferevent * bev)
|
||||
{
|
||||
struct ssl_shutdown_ctx * sslshutctx = NULL;
|
||||
UNUSED struct ssl_shutdown_ctx * sslshutctx = NULL;
|
||||
evutil_socket_t fd=-1;
|
||||
fd=bufferevent_getfd(bev);
|
||||
assert(fd==s_stream->_do_not_use.fd);
|
||||
@@ -2189,7 +2189,7 @@ int ssl_stream_get_integer_opt(struct ssl_stream *upstream, enum SSL_STREAM_OPT
|
||||
{
|
||||
struct ssl_service_status* svc=&upstream->up_parts.svc_status;
|
||||
struct tfe_cmsg *cmsg=NULL;
|
||||
int ret=0;
|
||||
UNUSED int ret=0;
|
||||
uint16_t out_size=0;
|
||||
switch(opt_type)
|
||||
{
|
||||
|
||||
@@ -210,7 +210,7 @@ struct tfe_stream_write_ctx * tfe_stream_write_frag_start(const struct tfe_strea
|
||||
{
|
||||
struct tfe_stream_private * _stream = to_stream_private(stream);
|
||||
struct tfe_stream_write_ctx ** ref_write_ctx = NULL;
|
||||
struct tfe_conn_private * this_conn = NULL;
|
||||
UNUSED struct tfe_conn_private * this_conn = NULL;
|
||||
struct tfe_conn_private * peer_conn = NULL;
|
||||
|
||||
if (dir == CONN_DIR_DOWNSTREAM)
|
||||
@@ -571,7 +571,7 @@ static void __stream_bev_readcb(struct bufferevent * bev, void * arg)
|
||||
struct tfe_stream_private * _stream = (struct tfe_stream_private *) arg;
|
||||
enum tfe_conn_dir dir = __bev_dir(_stream, bev);
|
||||
|
||||
struct tfe_conn_private * this_conn = __this_conn(_stream, dir);
|
||||
UNUSED struct tfe_conn_private * this_conn = __this_conn(_stream, dir);
|
||||
struct tfe_conn_private * peer_conn = __peer_conn(_stream, dir);
|
||||
|
||||
/* Peer connection is terminated, drain all data.
|
||||
|
||||
@@ -190,7 +190,7 @@ struct ssl_policy_enforcer* ssl_policy_enforcer_create(void* logger)
|
||||
enforcer->maat=g_business_maat;
|
||||
enforcer->logger=logger;
|
||||
enforcer->table_id=Maat_table_register(enforcer->maat, "PXY_INTERCEPT_COMPILE");
|
||||
int ret=Maat_plugin_EX_register(enforcer->maat,
|
||||
UNUSED int ret=Maat_plugin_EX_register(enforcer->maat,
|
||||
enforcer->table_id,
|
||||
intercept_param_new_cb,
|
||||
intercept_param_free_cb,
|
||||
|
||||
@@ -39,7 +39,7 @@ static int mr4_ethdev_send_finish(struct traffic_mirror_ethdev * ethdev, unsigne
|
||||
assert(detail_mr4 != NULL && detail_mr4->sendbuf[tid] != NULL);
|
||||
|
||||
marsio_buff_t * buff = detail_mr4->sendbuf[tid];
|
||||
char * append_ptr = marsio_buff_append(buff, pktlen);
|
||||
UNUSED char * append_ptr = marsio_buff_append(buff, pktlen);
|
||||
assert(append_ptr != NULL);
|
||||
|
||||
int ret = marsio_send_burst_with_options(detail_mr4->sendpath, tid, &buff, 1, MARSIO_SEND_OPT_REHASH);
|
||||
|
||||
Reference in New Issue
Block a user