diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-01-23 04:17:56 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-01-23 04:17:56 +0000 |
commit | a3346cc85f7711fdcecfb30c15b4fcb286f11b68 (patch) | |
tree | d92614ed4837a6ced7475e8280659c2795c5ae8a /pjlib | |
parent | 06b85d75ffb639032a22802bbe8914c70d48fb03 (diff) |
Fixed several compilation warnings with MSVC
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@897 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r-- | pjlib/src/pj/addr_resolv_sock.c | 5 | ||||
-rw-r--r-- | pjlib/src/pjlib-test/ioq_udp.c | 4 | ||||
-rw-r--r-- | pjlib/src/pjlib-test/thread.c | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/pjlib/src/pj/addr_resolv_sock.c b/pjlib/src/pj/addr_resolv_sock.c index e433dc32..c673e964 100644 --- a/pjlib/src/pj/addr_resolv_sock.c +++ b/pjlib/src/pj/addr_resolv_sock.c @@ -61,6 +61,11 @@ pj_status_t pj_gethostip(pj_in_addr *addr) cp = pj_str("127.0.0.1"); loopip = pj_inet_addr(&cp); +#ifdef _MSC_VER + /* Get rid of "uninitialized he variable" with MS compilers */ + pj_bzero(&he, sizeof(he)); +#endif + /* Try with resolving local hostname first */ status = pj_gethostbyname(hostname, &he); if (status == PJ_SUCCESS) { diff --git a/pjlib/src/pjlib-test/ioq_udp.c b/pjlib/src/pjlib-test/ioq_udp.c index dfc818fb..006adcc0 100644 --- a/pjlib/src/pjlib-test/ioq_udp.c +++ b/pjlib/src/pjlib-test/ioq_udp.c @@ -842,7 +842,7 @@ int udp_ioqueue_test() PJ_LOG(4, (THIS_FILE, "... note: buf=bytes sent, fds=# of fds, " "elapsed=in timer ticks")); -pass1: +//pass1: PJ_LOG(3, (THIS_FILE, "...Benchmarking poll times for %s:", pj_ioqueue_name())); PJ_LOG(3, (THIS_FILE, "...=====================================")); PJ_LOG(3, (THIS_FILE, "...Buf.size #inactive-socks Time/poll")); @@ -855,7 +855,7 @@ pass1: if ((status=bench_test(bufsize, SOCK_INACTIVE_MIN)) != 0) return status; } -pass2: +//pass2: bufsize = 512; for (sock_count=SOCK_INACTIVE_MIN+2; sock_count<=SOCK_INACTIVE_MAX+2; diff --git a/pjlib/src/pjlib-test/thread.c b/pjlib/src/pjlib-test/thread.c index e901df7d..d63d7fc3 100644 --- a/pjlib/src/pjlib-test/thread.c +++ b/pjlib/src/pjlib-test/thread.c @@ -187,7 +187,7 @@ static int timeslice_test(void) pj_pool_t *pool; pj_uint32_t counter[NUM_THREADS], lowest, highest, diff; pj_thread_t *thread[NUM_THREADS]; - int i; + unsigned i; pj_status_t rc; quit_flag = 0; |