Multiple revisions 380735-380736

........
  r380735 | qwell | 2013-01-31 15:40:09 -0600 (Thu, 31 Jan 2013) | 1 line
  
  Fix a few compiler warnings.
........
  r380736 | qwell | 2013-01-31 15:42:34 -0600 (Thu, 31 Jan 2013) | 1 line
  
  Ignore warnings caused by PJ_TODO()s in pjproject.
........

Merged revisions 380735-380736 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/78/78/1
Jason Parker 13 years ago
parent 5899e13112
commit 5b41fbfe8b

@ -20,6 +20,7 @@
*/ */
#define PJ_HAS_IPV6 1 #define PJ_HAS_IPV6 1
#define PJ_TODO(id)
/* /*
* Typical configuration for WinCE target. * Typical configuration for WinCE target.

@ -106,7 +106,7 @@ static void log_set_indent(int indent)
pj_thread_local_set(thread_indent_tls_id, (void*)(long)indent); pj_thread_local_set(thread_indent_tls_id, (void*)(long)indent);
} }
static int log_get_raw_indent() static int log_get_raw_indent(void)
{ {
return (long)pj_thread_local_get(thread_indent_tls_id); return (long)pj_thread_local_get(thread_indent_tls_id);
} }
@ -118,13 +118,13 @@ static void log_set_indent(int indent)
if (log_indent < 0) log_indent = 0; if (log_indent < 0) log_indent = 0;
} }
static int log_get_raw_indent() static int log_get_raw_indent(void)
{ {
return log_indent; return log_indent;
} }
#endif /* PJ_LOG_ENABLE_INDENT && PJ_HAS_THREADS */ #endif /* PJ_LOG_ENABLE_INDENT && PJ_HAS_THREADS */
static int log_get_indent() static int log_get_indent(void)
{ {
int indent = log_get_raw_indent(); int indent = log_get_raw_indent();
return indent > LOG_MAX_INDENT ? LOG_MAX_INDENT : indent; return indent > LOG_MAX_INDENT ? LOG_MAX_INDENT : indent;

@ -43,7 +43,7 @@ static void pool_buf_cleanup(void)
is_initialized = 0; is_initialized = 0;
} }
static pj_status_t pool_buf_initialize() static pj_status_t pool_buf_initialize(void)
{ {
pj_atexit(&pool_buf_cleanup); pj_atexit(&pool_buf_cleanup);

@ -602,8 +602,8 @@ static pj_status_t create_ssl(pj_ssl_sock_t *ssock)
/* Setup SSL BIOs */ /* Setup SSL BIOs */
ssock->ossl_rbio = BIO_new(BIO_s_mem()); ssock->ossl_rbio = BIO_new(BIO_s_mem());
ssock->ossl_wbio = BIO_new(BIO_s_mem()); ssock->ossl_wbio = BIO_new(BIO_s_mem());
BIO_set_close(ssock->ossl_rbio, BIO_CLOSE); (void)BIO_set_close(ssock->ossl_rbio, BIO_CLOSE);
BIO_set_close(ssock->ossl_wbio, BIO_CLOSE); (void)BIO_set_close(ssock->ossl_wbio, BIO_CLOSE);
SSL_set_bio(ssock->ossl_ssl, ssock->ossl_rbio, ssock->ossl_wbio); SSL_set_bio(ssock->ossl_ssl, ssock->ossl_rbio, ssock->ossl_wbio);
return PJ_SUCCESS; return PJ_SUCCESS;
@ -1145,7 +1145,7 @@ static pj_status_t flush_write_bio(pj_ssl_sock_t *ssock,
} }
/* Reset write BIO after flushed */ /* Reset write BIO after flushed */
BIO_reset(ssock->ossl_wbio); (void)BIO_reset(ssock->ossl_wbio);
if (status == PJ_EPENDING) { if (status == PJ_EPENDING) {
/* Update write state */ /* Update write state */

@ -47,10 +47,10 @@ void app_perror(pj_status_t status, const char *msg)
* https://trac.pjsip.org/repos/ticket/1337 * https://trac.pjsip.org/repos/ticket/1337
*/ */
#if PJMEDIA_HAS_G711_CODEC==0 #if PJMEDIA_HAS_G711_CODEC==0
int dummy() void *dummy()
{ {
// Dummy // Dummy
return (int) &pjmedia_plc_save; return &pjmedia_plc_save;
} }
#endif #endif

@ -514,9 +514,9 @@ static void icedemo_stop_session(void)
reset_rem_info(); reset_rem_info();
} }
#define PRINT(fmt, arg0, arg1, arg2, arg3, arg4, arg5) \ #define PRINT(...) \
printed = pj_ansi_snprintf(p, maxlen - (p-buffer), \ printed = pj_ansi_snprintf(p, maxlen - (p-buffer), \
fmt, arg0, arg1, arg2, arg3, arg4, arg5); \ __VA_ARGS__); \
if (printed <= 0) return -PJ_ETOOSMALL; \ if (printed <= 0) return -PJ_ETOOSMALL; \
p += printed p += printed
@ -539,8 +539,7 @@ static int print_cand(char buffer[], unsigned maxlen,
(unsigned)pj_sockaddr_get_port(&cand->addr)); (unsigned)pj_sockaddr_get_port(&cand->addr));
PRINT("%s\n", PRINT("%s\n",
pj_ice_get_cand_type_name(cand->type), pj_ice_get_cand_type_name(cand->type));
0, 0, 0, 0, 0);
if (p == buffer+maxlen) if (p == buffer+maxlen)
return -PJ_ETOOSMALL; return -PJ_ETOOSMALL;
@ -562,8 +561,7 @@ static int encode_session(char buffer[], unsigned maxlen)
pj_status_t status; pj_status_t status;
/* Write "dummy" SDP v=, o=, s=, and t= lines */ /* Write "dummy" SDP v=, o=, s=, and t= lines */
PRINT("v=0\no=- 3414953978 3414953978 IN IP4 localhost\ns=ice\nt=0 0\n", PRINT("v=0\no=- 3414953978 3414953978 IN IP4 localhost\ns=ice\nt=0 0\n");
0, 0, 0, 0, 0, 0);
/* Get ufrag and pwd from current session */ /* Get ufrag and pwd from current session */
pj_ice_strans_get_ufrag_pwd(icedemo.icest, &local_ufrag, &local_pwd, pj_ice_strans_get_ufrag_pwd(icedemo.icest, &local_ufrag, &local_pwd,
@ -574,8 +572,7 @@ static int encode_session(char buffer[], unsigned maxlen)
(int)local_ufrag.slen, (int)local_ufrag.slen,
local_ufrag.ptr, local_ufrag.ptr,
(int)local_pwd.slen, (int)local_pwd.slen,
local_pwd.ptr, local_pwd.ptr);
0, 0);
/* Write each component */ /* Write each component */
for (comp=0; comp<icedemo.opt.comp_cnt; ++comp) { for (comp=0; comp<icedemo.opt.comp_cnt; ++comp) {
@ -595,22 +592,19 @@ static int encode_session(char buffer[], unsigned maxlen)
"c=IN IP4 %s\n", "c=IN IP4 %s\n",
(int)pj_sockaddr_get_port(&cand[0].addr), (int)pj_sockaddr_get_port(&cand[0].addr),
pj_sockaddr_print(&cand[0].addr, ipaddr, pj_sockaddr_print(&cand[0].addr, ipaddr,
sizeof(ipaddr), 0), sizeof(ipaddr), 0));
0, 0, 0, 0);
} else if (comp==1) { } else if (comp==1) {
/* For component 2, default address is in a=rtcp line */ /* For component 2, default address is in a=rtcp line */
PRINT("a=rtcp:%d IN IP4 %s\n", PRINT("a=rtcp:%d IN IP4 %s\n",
(int)pj_sockaddr_get_port(&cand[0].addr), (int)pj_sockaddr_get_port(&cand[0].addr),
pj_sockaddr_print(&cand[0].addr, ipaddr, pj_sockaddr_print(&cand[0].addr, ipaddr,
sizeof(ipaddr), 0), sizeof(ipaddr), 0));
0, 0, 0, 0);
} else { } else {
/* For other components, we'll just invent this.. */ /* For other components, we'll just invent this.. */
PRINT("a=Xice-defcand:%d IN IP4 %s\n", PRINT("a=Xice-defcand:%d IN IP4 %s\n",
(int)pj_sockaddr_get_port(&cand[0].addr), (int)pj_sockaddr_get_port(&cand[0].addr),
pj_sockaddr_print(&cand[0].addr, ipaddr, pj_sockaddr_print(&cand[0].addr, ipaddr,
sizeof(ipaddr), 0), sizeof(ipaddr), 0));
0, 0, 0, 0);
} }
/* Enumerate all candidates for this component */ /* Enumerate all candidates for this component */

Loading…
Cancel
Save