From a3346cc85f7711fdcecfb30c15b4fcb286f11b68 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 23 Jan 2007 04:17:56 +0000 Subject: Fixed several compilation warnings with MSVC git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@897 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pj/addr_resolv_sock.c | 5 +++++ pjlib/src/pjlib-test/ioq_udp.c | 4 ++-- pjlib/src/pjlib-test/thread.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'pjlib/src') 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; -- cgit v1.2.3