[asterisk-commits] qwell: branch 11 r380735 - in /branches/11/res/pjproject: pjlib/src/pj/ pjmed...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 31 15:40:12 CST 2013


Author: qwell
Date: Thu Jan 31 15:40:09 2013
New Revision: 380735

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380735
Log:
Fix a few compiler warnings.

Modified:
    branches/11/res/pjproject/pjlib/src/pj/log.c
    branches/11/res/pjproject/pjlib/src/pj/pool_buf.c
    branches/11/res/pjproject/pjlib/src/pj/ssl_sock_ossl.c
    branches/11/res/pjproject/pjmedia/src/test/test.c
    branches/11/res/pjproject/pjsip-apps/src/samples/icedemo.c

Modified: branches/11/res/pjproject/pjlib/src/pj/log.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/pjproject/pjlib/src/pj/log.c?view=diff&rev=380735&r1=380734&r2=380735
==============================================================================
--- branches/11/res/pjproject/pjlib/src/pj/log.c (original)
+++ branches/11/res/pjproject/pjlib/src/pj/log.c Thu Jan 31 15:40:09 2013
@@ -106,7 +106,7 @@
     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);
 }
@@ -118,13 +118,13 @@
     if (log_indent < 0) log_indent = 0;
 }
 
-static int log_get_raw_indent()
+static int log_get_raw_indent(void)
 {
     return log_indent;
 }
 #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();
     return indent > LOG_MAX_INDENT ? LOG_MAX_INDENT : indent;

Modified: branches/11/res/pjproject/pjlib/src/pj/pool_buf.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/pjproject/pjlib/src/pj/pool_buf.c?view=diff&rev=380735&r1=380734&r2=380735
==============================================================================
--- branches/11/res/pjproject/pjlib/src/pj/pool_buf.c (original)
+++ branches/11/res/pjproject/pjlib/src/pj/pool_buf.c Thu Jan 31 15:40:09 2013
@@ -43,7 +43,7 @@
 	is_initialized = 0;
 }
 
-static pj_status_t pool_buf_initialize()
+static pj_status_t pool_buf_initialize(void)
 {
     pj_atexit(&pool_buf_cleanup);
 

Modified: branches/11/res/pjproject/pjlib/src/pj/ssl_sock_ossl.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/pjproject/pjlib/src/pj/ssl_sock_ossl.c?view=diff&rev=380735&r1=380734&r2=380735
==============================================================================
--- branches/11/res/pjproject/pjlib/src/pj/ssl_sock_ossl.c (original)
+++ branches/11/res/pjproject/pjlib/src/pj/ssl_sock_ossl.c Thu Jan 31 15:40:09 2013
@@ -602,8 +602,8 @@
     /* Setup SSL BIOs */
     ssock->ossl_rbio = BIO_new(BIO_s_mem());
     ssock->ossl_wbio = BIO_new(BIO_s_mem());
-    BIO_set_close(ssock->ossl_rbio, BIO_CLOSE);
-    BIO_set_close(ssock->ossl_wbio, BIO_CLOSE);
+    (void)BIO_set_close(ssock->ossl_rbio, BIO_CLOSE);
+    (void)BIO_set_close(ssock->ossl_wbio, BIO_CLOSE);
     SSL_set_bio(ssock->ossl_ssl, ssock->ossl_rbio, ssock->ossl_wbio);
 
     return PJ_SUCCESS;
@@ -1145,7 +1145,7 @@
     }
 
     /* Reset write BIO after flushed */
-    BIO_reset(ssock->ossl_wbio);
+    (void)BIO_reset(ssock->ossl_wbio);
 
     if (status == PJ_EPENDING) {
 	/* Update write state */

Modified: branches/11/res/pjproject/pjmedia/src/test/test.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/pjproject/pjmedia/src/test/test.c?view=diff&rev=380735&r1=380734&r2=380735
==============================================================================
--- branches/11/res/pjproject/pjmedia/src/test/test.c (original)
+++ branches/11/res/pjproject/pjmedia/src/test/test.c Thu Jan 31 15:40:09 2013
@@ -47,10 +47,10 @@
  *  https://trac.pjsip.org/repos/ticket/1337 
  */
 #if PJMEDIA_HAS_G711_CODEC==0
-int dummy()
+void *dummy()
 {
     // Dummy
-    return (int) &pjmedia_plc_save;
+    return &pjmedia_plc_save;
 }
 #endif
 

Modified: branches/11/res/pjproject/pjsip-apps/src/samples/icedemo.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/pjproject/pjsip-apps/src/samples/icedemo.c?view=diff&rev=380735&r1=380734&r2=380735
==============================================================================
--- branches/11/res/pjproject/pjsip-apps/src/samples/icedemo.c (original)
+++ branches/11/res/pjproject/pjsip-apps/src/samples/icedemo.c Thu Jan 31 15:40:09 2013
@@ -514,9 +514,9 @@
     reset_rem_info();
 }
 
-#define PRINT(fmt, arg0, arg1, arg2, arg3, arg4, arg5)	    \
+#define PRINT(...) \
 	printed = pj_ansi_snprintf(p, maxlen - (p-buffer),  \
-				   fmt, arg0, arg1, arg2, arg3, arg4, arg5); \
+				   __VA_ARGS__); \
 	if (printed <= 0) return -PJ_ETOOSMALL; \
 	p += printed
 
@@ -539,8 +539,7 @@
 	  (unsigned)pj_sockaddr_get_port(&cand->addr));
 
     PRINT("%s\n",
-	  pj_ice_get_cand_type_name(cand->type),
-	  0, 0, 0, 0, 0);
+	  pj_ice_get_cand_type_name(cand->type));
 
     if (p == buffer+maxlen)
 	return -PJ_ETOOSMALL;
@@ -562,8 +561,7 @@
     pj_status_t status;
 
     /* Write "dummy" SDP v=, o=, s=, and t= lines */
-    PRINT("v=0\no=- 3414953978 3414953978 IN IP4 localhost\ns=ice\nt=0 0\n", 
-	  0, 0, 0, 0, 0, 0);
+    PRINT("v=0\no=- 3414953978 3414953978 IN IP4 localhost\ns=ice\nt=0 0\n");
 
     /* Get ufrag and pwd from current session */
     pj_ice_strans_get_ufrag_pwd(icedemo.icest, &local_ufrag, &local_pwd,
@@ -574,8 +572,7 @@
 	   (int)local_ufrag.slen,
 	   local_ufrag.ptr,
 	   (int)local_pwd.slen,
-	   local_pwd.ptr, 
-	   0, 0);
+	   local_pwd.ptr);
 
     /* Write each component */
     for (comp=0; comp<icedemo.opt.comp_cnt; ++comp) {
@@ -595,22 +592,19 @@
 		  "c=IN IP4 %s\n",
 		  (int)pj_sockaddr_get_port(&cand[0].addr),
 		  pj_sockaddr_print(&cand[0].addr, ipaddr,
-				    sizeof(ipaddr), 0),
-		  0, 0, 0, 0);
+				    sizeof(ipaddr), 0));
 	} else if (comp==1) {
 	    /* For component 2, default address is in a=rtcp line */
 	    PRINT("a=rtcp:%d IN IP4 %s\n",
 		  (int)pj_sockaddr_get_port(&cand[0].addr),
 		  pj_sockaddr_print(&cand[0].addr, ipaddr,
-				    sizeof(ipaddr), 0),
-		  0, 0, 0, 0);
+				    sizeof(ipaddr), 0));
 	} else {
 	    /* For other components, we'll just invent this.. */
 	    PRINT("a=Xice-defcand:%d IN IP4 %s\n",
 		  (int)pj_sockaddr_get_port(&cand[0].addr),
 		  pj_sockaddr_print(&cand[0].addr, ipaddr,
-				    sizeof(ipaddr), 0),
-		  0, 0, 0, 0);
+				    sizeof(ipaddr), 0));
 	}
 
 	/* Enumerate all candidates for this component */




More information about the asterisk-commits mailing list