设置 UNUSED,修复编译警告

This commit is contained in:
luwenpeng
2019-09-02 11:39:19 +08:00
parent 4f71023c54
commit 06fe5652c5
6 changed files with 21 additions and 21 deletions

View File

@@ -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)
{

View File

@@ -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.