diff --git a/platform/src/key_keeper.cpp b/platform/src/key_keeper.cpp index d573112..ec17040 100644 --- a/platform/src/key_keeper.cpp +++ b/platform/src/key_keeper.cpp @@ -465,7 +465,7 @@ static void key_keeper_free_serialized(void* data) static MESA_htable_handle create_hash_table(unsigned int slot_size, unsigned int expire_seconds) { - int ret = 0; + UNUSED int ret = 0; unsigned max_num = slot_size * 4; MESA_htable_handle htable = MESA_htable_born(); ret = __wrapper_MESA_htable_set_opt_int(htable, MHO_SCREEN_PRINT_CTRL, 0); diff --git a/platform/src/ssl_sess_cache.cpp b/platform/src/ssl_sess_cache.cpp index 93cf070..cc41a3c 100644 --- a/platform/src/ssl_sess_cache.cpp +++ b/platform/src/ssl_sess_cache.cpp @@ -45,7 +45,8 @@ static struct asn1_sess * ssl_sess_serialize(SSL_SESSION * sess) { struct asn1_sess * result = ALLOC(struct asn1_sess, 1); - int i = i2d_SSL_SESSION(sess, NULL), j=0; + int i = i2d_SSL_SESSION(sess, NULL); + UNUSED int j=0; result->size = (size_t) i; unsigned char* temp=NULL; assert(i > 0); @@ -129,7 +130,7 @@ static long sess_cache_set_cb(void * data, const uchar * key, uint size, void * struct asn1_sess * new_asn1 = args->new_sess; struct asn1_sess * cur_asn1 = (struct asn1_sess *) data; - int ret = 0; + UNUSED int ret = 0; if (cur_asn1 != NULL) { free(cur_asn1->buff); @@ -149,7 +150,7 @@ static long sess_cache_set_cb(void * data, const uchar * key, uint size, void * static size_t upsess_mk_key(struct sockaddr * res, socklen_t addrlen, const char * sni, unsigned char ** key_buf) { size_t key_size = 0; - unsigned short port; + unsigned short port=0; char *s = NULL; switch(res->sa_family) { @@ -299,7 +300,7 @@ struct sess_cache * ssl_sess_cache_create(unsigned int slot_size, unsigned int e { struct sess_cache * cache = ALLOC(struct sess_cache, 1); unsigned max_num = slot_size * 4; - int ret = 0; + UNUSED int ret = 0; MESA_htable_handle htable = MESA_htable_born(); ret = __wrapper_MESA_htable_set_opt(htable, MHO_SCREEN_PRINT_CTRL, 0); diff --git a/platform/test/test_tfe_rpc.cpp b/platform/test/test_tfe_rpc.cpp index c75e336..609b391 100644 --- a/platform/test/test_tfe_rpc.cpp +++ b/platform/test/test_tfe_rpc.cpp @@ -209,6 +209,7 @@ static void tfe_rpc_on_succ(void* result, void* user) printf("len is %d\n", len); struct keyring* kyr = get_keyring_from_response(data); assert(kyr!=NULL); + (void)kyr; //add to hash table } diff --git a/plugin/business/pangu-http/src/test_pattern_replace.cpp b/plugin/business/pangu-http/src/test_pattern_replace.cpp index 573bf9a..ba1bc51 100644 --- a/plugin/business/pangu-http/src/test_pattern_replace.cpp +++ b/plugin/business/pangu-http/src/test_pattern_replace.cpp @@ -12,7 +12,7 @@ TEST(PatternReplace, Grouping1) const char* find="(?John)|(?李梅梅)|(?Jake)"; const char* replacement="${name1:+Joseph:${name2:+王桃花:Keith}}"; const char* input="John loves 李梅梅, 李梅梅 loves Jake and Jake doesn't care about John and 李梅梅."; - const char* expect="Joseph loves 王桃花, 王桃花 loves Keith and Keith doesn't care about Joseph and 王桃花."; + __attribute__((unused)) const char* expect="Joseph loves 王桃花, 王桃花 loves Keith and Keith doesn't care about Joseph and 王桃花."; char* output=NULL; size_t output_sz=0;