设置 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()))
|
||||
|
||||
Reference in New Issue
Block a user