diff options
author | Riza Sulistyo <riza@teluu.com> | 2013-03-05 03:12:32 +0000 |
---|---|---|
committer | Riza Sulistyo <riza@teluu.com> | 2013-03-05 03:12:32 +0000 |
commit | cd32d40cb26a2823cfc9805f5c76bc3711864196 (patch) | |
tree | 838cf8019c64a6f044ded9539be76678a9e8b87c /pjnath/src/pjnath-test | |
parent | 9df2311a5f5f9211f24ad03e13c161ec5d6429bf (diff) |
Misc (re #1559): fixed compile errors/warnings on MSVC
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4412 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath/src/pjnath-test')
-rw-r--r-- | pjnath/src/pjnath-test/concur_test.c | 9 | ||||
-rw-r--r-- | pjnath/src/pjnath-test/ice_test.c | 8 |
2 files changed, 14 insertions, 3 deletions
diff --git a/pjnath/src/pjnath-test/concur_test.c b/pjnath/src/pjnath-test/concur_test.c index 92c2d394..fbb0bc49 100644 --- a/pjnath/src/pjnath-test/concur_test.c +++ b/pjnath/src/pjnath-test/concur_test.c @@ -158,6 +158,10 @@ static pj_bool_t stun_sock_on_status(pj_stun_sock *stun_sock, pj_status_t status) { struct stun_test_session *test_sess = (struct stun_test_session*)pj_stun_sock_get_user_data(stun_sock); + + PJ_UNUSED_ARG(op); + PJ_UNUSED_ARG(status); + test_sess->param.client_got_response++; return PJ_TRUE; } @@ -192,7 +196,7 @@ static int stun_destroy_test_session(struct stun_test_session *test_sess) for (i=0; i<MAX_SOCK_CLIENTS; ++i) { pj_str_t server_ip = pj_str("127.0.0.1"); status = pj_stun_sock_start(stun_sock[i], &server_ip, - test_sess->server_port, NULL); + (pj_uint16_t)test_sess->server_port, NULL); if (status != PJ_SUCCESS) { PJ_PERROR(1,(THIS_FILE, status, "Error starting stun socket")); return -20; @@ -323,6 +327,9 @@ static int stun_destroy_test(void) pj_thread_sleep(10); } + /* Avoid compiler warning */ + goto on_return; + on_return: test_sess.thread_quit_flag = PJ_TRUE; diff --git a/pjnath/src/pjnath-test/ice_test.c b/pjnath/src/pjnath-test/ice_test.c index 0a4c8a3e..66d48314 100644 --- a/pjnath/src/pjnath-test/ice_test.c +++ b/pjnath/src/pjnath-test/ice_test.c @@ -467,7 +467,8 @@ static int check_pair(const struct ice_ept *ept1, const struct ice_ept *ept2, break; \ } \ PJ_TIME_VAL_SUB(t, t0); \ - if (PJ_TIME_VAL_MSEC(t) >= (timeout)) break; \ + if ((unsigned)PJ_TIME_VAL_MSEC(t) >= (timeout)) \ + break; \ } \ } @@ -1015,7 +1016,7 @@ int ice_one_conc_test(pj_stun_config *stun_cfg, int err_quit) int ice_conc_test(void) { - const int LOOP = 100; + const unsigned LOOP = 100; pj_pool_t *pool; pj_stun_config stun_cfg; unsigned i; @@ -1034,6 +1035,9 @@ int ice_conc_test(void) if (rc) break; } + + /* Avoid compiler warning */ + goto on_return; on_return: destroy_stun_config(&stun_cfg); |