Index: /pjproject/trunk/pjlib/src/pj/lock.c
===================================================================
--- /pjproject/trunk/pjlib/src/pj/lock.c	(revision 4411)
+++ /pjproject/trunk/pjlib/src/pj/lock.c	(revision 4412)
@@ -710,4 +710,6 @@
     PJ_LOG(4,(THIS_FILE, "Group lock %p, ref_cnt=%d. Reference holders: %s",
 	       grp_lock, pj_grp_lock_get_ref(grp_lock), info.ptr));
+#else
+    PJ_UNUSED_ARG(grp_lock);
 #endif
 }
Index: /pjproject/trunk/pjmedia/src/pjmedia/converter.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/converter.c	(revision 4411)
+++ /pjproject/trunk/pjmedia/src/pjmedia/converter.c	(revision 4412)
@@ -40,5 +40,7 @@
 {
     pjmedia_converter_mgr *mgr;
+#if PJMEDIA_HAS_LIBSWSCALE && PJMEDIA_HAS_LIBAVUTIL
     pj_status_t status = PJ_SUCCESS;
+#endif
 
     mgr = PJ_POOL_ALLOC_T(pool, pjmedia_converter_mgr);
Index: /pjproject/trunk/pjnath/src/pjnath-test/concur_test.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjnath-test/concur_test.c	(revision 4411)
+++ /pjproject/trunk/pjnath/src/pjnath-test/concur_test.c	(revision 4412)
@@ -159,4 +159,8 @@
 {
     struct stun_test_session *test_sess = (struct stun_test_session*)pj_stun_sock_get_user_data(stun_sock);
+
+    PJ_UNUSED_ARG(op);
+    PJ_UNUSED_ARG(status);
+
     test_sess->param.client_got_response++;
     return PJ_TRUE;
@@ -193,5 +197,5 @@
 	pj_str_t server_ip = pj_str("127.0.0.1");
 	status = pj_stun_sock_start(stun_sock[i], &server_ip,
-	                            test_sess->server_port, NULL);
+	                            (pj_uint16_t)test_sess->server_port, NULL);
 	if (status != PJ_SUCCESS) {
 	    PJ_PERROR(1,(THIS_FILE, status, "Error starting stun socket"));
@@ -324,4 +328,7 @@
     }
 
+    /* Avoid compiler warning */
+    goto on_return;
+
 
 on_return:
Index: /pjproject/trunk/pjnath/src/pjnath-test/ice_test.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjnath-test/ice_test.c	(revision 4411)
+++ /pjproject/trunk/pjnath/src/pjnath-test/ice_test.c	(revision 4412)
@@ -468,5 +468,6 @@
 				    } \
 				    PJ_TIME_VAL_SUB(t, t0); \
-				    if (PJ_TIME_VAL_MSEC(t) >= (timeout)) break; \
+				    if ((unsigned)PJ_TIME_VAL_MSEC(t) >= (timeout)) \
+					break; \
 				} \
 			    }
@@ -1016,5 +1017,5 @@
 int ice_conc_test(void)
 {
-    const int LOOP = 100;
+    const unsigned LOOP = 100;
     pj_pool_t *pool;
     pj_stun_config stun_cfg;
@@ -1035,4 +1036,7 @@
 	    break;
     }
+
+    /* Avoid compiler warning */
+    goto on_return;
     
 on_return:
Index: /pjproject/trunk/pjnath/src/pjnath/ice_strans.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjnath/ice_strans.c	(revision 4411)
+++ /pjproject/trunk/pjnath/src/pjnath/ice_strans.c	(revision 4412)
@@ -32,6 +32,7 @@
 #include <pj/compat/socket.h>
 
-
-#if 0
+#define ENABLE_TRACE 0
+
+#if defined(ENABLE_TRACE) && (ENABLE_TRACE != 0)
 #  define TRACE_PKT(expr)	    PJ_LOG(5,expr)
 #else
@@ -1321,4 +1322,7 @@
     pj_ice_strans_comp *comp;
     pj_status_t status;
+#if defined(ENABLE_TRACE) && (ENABLE_TRACE != 0)
+    char daddr[PJ_INET6_ADDRSTRLEN];
+#endif
 
     PJ_ASSERT_RETURN(comp_id && comp_id <= ice_st->comp_cnt, PJ_EINVAL);
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 4411)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 4412)
@@ -744,8 +744,9 @@
     /* Copy binding port setting to STUN setting */
     pj_sockaddr_init(ice_cfg.af, &ice_cfg.stun.cfg.bound_addr,
-		     &cfg->bound_addr, cfg->port);
-    ice_cfg.stun.cfg.port_range = cfg->port_range;
+		     &cfg->bound_addr, (pj_uint16_t)cfg->port);
+    ice_cfg.stun.cfg.port_range = (pj_uint16_t)cfg->port_range;
     if (cfg->port != 0 && ice_cfg.stun.cfg.port_range == 0)
-	ice_cfg.stun.cfg.port_range = pjsua_var.ua_cfg.max_calls * 10;
+	ice_cfg.stun.cfg.port_range = 
+				 (pj_uint16_t)(pjsua_var.ua_cfg.max_calls * 10);
 
     /* Copy QoS setting to STUN setting */
@@ -777,8 +778,9 @@
 	/* Copy binding port setting to TURN setting */
 	pj_sockaddr_init(ice_cfg.af, &ice_cfg.turn.cfg.bound_addr,
-			 &cfg->bound_addr, cfg->port);
-	ice_cfg.turn.cfg.port_range = cfg->port_range;
+			 &cfg->bound_addr, (pj_uint16_t)cfg->port);
+	ice_cfg.turn.cfg.port_range = (pj_uint16_t)cfg->port_range;
 	if (cfg->port != 0 && ice_cfg.turn.cfg.port_range == 0)
-	    ice_cfg.turn.cfg.port_range = pjsua_var.ua_cfg.max_calls * 10;
+	    ice_cfg.turn.cfg.port_range = 
+				 (pj_uint16_t)(pjsua_var.ua_cfg.max_calls * 10);
     }
 
