From 262defe8ad75325065fd64ea5d3a03a59c5f3039 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 19 Jul 2011 08:40:20 +0000 Subject: Re #1326: - Fixed compile warnings on vs2005 - Fixed compile error when PJMEDIA_HAS_VIDEO set to 0 on vs2005 git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3666 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pj/ioqueue_common_abs.c | 14 ++++++++------ pjlib/src/pj/os_core_win32.c | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'pjlib') diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index 8d68275b..296aea90 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -283,7 +283,7 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) /* Socket is writable. */ struct write_operation *write_op; pj_ssize_t sent; - pj_status_t send_rc; + pj_status_t send_rc = PJ_SUCCESS; /* Get the first in the queue. */ write_op = h->write_list.next; @@ -312,8 +312,8 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) */ //write_op->op = 0; } else if (write_op->op == PJ_IOQUEUE_OP_SEND_TO) { - int retry; - for (retry=0; retry<2; ++retry) { + int retry = 2; + while (--retry >= 0) { send_rc = pj_sock_sendto(h->fd, write_op->buf+write_op->written, &sent, write_op->flags, @@ -935,17 +935,19 @@ PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key, { struct write_operation *write_op; unsigned retry; -#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ - PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 pj_bool_t restart_retry = PJ_FALSE; -#endif pj_status_t status; pj_ssize_t sent; PJ_ASSERT_RETURN(key && op_key && data && length, PJ_EINVAL); PJ_CHECK_STACK(); +#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ + PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 retry_on_restart: +#else + PJ_UNUSED_ARG(restart_retry); +#endif /* Check if key is closing. */ if (IS_CLOSING(key)) return PJ_ECANCELLED; diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c index 2b703e74..866afb99 100644 --- a/pjlib/src/pj/os_core_win32.c +++ b/pjlib/src/pj/os_core_win32.c @@ -1428,5 +1428,6 @@ PJ_DEF(pj_color_t) pj_term_get_color(void) PJ_DEF(int) pj_run_app(pj_main_func_ptr main_func, int argc, char *argv[], unsigned flags) { + PJ_UNUSED_ARG(flags); return (*main_func)(argc, argv); } -- cgit v1.2.3