fix(ut): compile warning

This commit is contained in:
fengzero
2022-06-14 05:43:10 +00:00
parent 082f68b752
commit 5a18ebda1a
2 changed files with 5 additions and 10 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ TEST(HTTPTest, http_get_param)
nng_url_parse(&url, "http://127.0.0.1");
nng_http_req_alloc(&req, url);
for (int i = 0; i < sizeof(data) / sizeof(query_param_data_t); ++i) {
for (uint64_t i = 0; i < sizeof(data) / sizeof(query_param_data_t); ++i) {
nng_http_req_set_uri(req, (char *) data[i].uri);
nng_aio_set_input(aio, 0, req);
len = 0;
@@ -135,7 +135,7 @@ TEST(HTTPTest, http_get_param_node_id)
nng_url_parse(&url, "http://127.0.0.1");
nng_http_req_alloc(&req, url);
for (int i = 0; i < sizeof(data) / sizeof(query_node_id_data_t); ++i) {
for (uint64_t i = 0; i < sizeof(data) / sizeof(query_node_id_data_t); ++i) {
neu_node_id_t prev_node_id = node_id;
nng_http_req_set_uri(req, (char *) data[i].uri);
nng_aio_set_input(aio, 0, req);
+3 -8
View File
@@ -10,9 +10,7 @@
zlog_category_t *neuron = NULL;
TEST(JwtTest, SetJwt)
{
char * token = NULL;
unsigned char public_key[4096] = { 0 };
size_t pub_key_len = 0;
char *token = NULL;
EXPECT_EQ(0, neu_jwt_init((char *) "./config"));
@@ -24,11 +22,8 @@ TEST(JwtTest, SetJwt)
TEST(JwtTest, JwtValidate)
{
char * token = NULL;
char b_token[1024] = { 0 };
unsigned char public_key[4096] = { 0 };
size_t pub_key_len = 0;
struct timeval expire_tv = { 0 };
char *token = NULL;
char b_token[1024] = { 0 };
EXPECT_EQ(0, neu_jwt_init((char *) "./config"));
EXPECT_EQ(0, neu_jwt_new(&token));