Index: pjproject/trunk/pjlib-util/src/pjlib-util-test/resolver_test.c
===================================================================
--- pjproject/trunk/pjlib-util/src/pjlib-util-test/resolver_test.c	(revision 5534)
+++ pjproject/trunk/pjlib-util/src/pjlib-util-test/resolver_test.c	(revision 5535)
@@ -711,4 +711,5 @@
     rc = pj_dns_parse_a_response(&pkt, &rec);
     pj_assert(rc == PJLIB_UTIL_EDNSNOANSWERREC);
+    PJ_UNUSED_ARG(rc);
 
     return 0;
@@ -920,4 +921,5 @@
     rc = pj_dns_parse_addr_response(&pkt, &rec);
     pj_assert(rc == PJLIB_UTIL_EDNSNOANSWERREC);
+    PJ_UNUSED_ARG(rc);
 
     return 0;
@@ -1469,5 +1471,5 @@
 
 
-    return 0;
+    return status;
 }
 
@@ -1839,5 +1841,5 @@
     pj_sem_wait(sem);
 
-    return 0;
+    return status;
 }
 
Index: pjproject/trunk/pjlib-util/src/pjlib-util/errno.c
===================================================================
--- pjproject/trunk/pjlib-util/src/pjlib-util/errno.c	(revision 5534)
+++ pjproject/trunk/pjlib-util/src/pjlib-util/errno.c	(revision 5535)
@@ -185,4 +185,4 @@
     pj_assert(status == PJ_SUCCESS);
 
-    return PJ_SUCCESS;
+    return status;
 }
Index: pjproject/trunk/pjmedia/src/test/mips_test.c
===================================================================
--- pjproject/trunk/pjmedia/src/test/mips_test.c	(revision 5534)
+++ pjproject/trunk/pjmedia/src/test/mips_test.c	(revision 5535)
@@ -716,5 +716,5 @@
     }
 
-    return PJ_SUCCESS;
+    return status;
 }
 
@@ -1030,5 +1030,5 @@
     }
 
-    return PJ_SUCCESS;
+    return status;
 }
 
@@ -1203,5 +1203,5 @@
     }
 
-    return PJ_SUCCESS;
+    return status;
 }
 
@@ -2094,5 +2094,5 @@
     }
 
-    return PJ_SUCCESS;
+    return status;
 }
 
@@ -2122,5 +2122,5 @@
     }
 
-    return PJ_SUCCESS;
+    return status;
 }
 
@@ -2366,4 +2366,5 @@
 	}
     }
+    PJ_UNUSED_ARG(status);
     pj_get_timestamp(&t1);
 
Index: pjproject/trunk/pjnath/src/pjnath-test/concur_test.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath-test/concur_test.c	(revision 5534)
+++ pjproject/trunk/pjnath/src/pjnath-test/concur_test.c	(revision 5535)
@@ -289,4 +289,5 @@
 	pj_assert(status == PJ_SUCCESS);
     }
+    PJ_UNUSED_ARG(status);
 
     /* Test 1: Main thread calls destroy while callback is processing response */
Index: pjproject/trunk/pjnath/src/pjnath-test/stun.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath-test/stun.c	(revision 5534)
+++ pjproject/trunk/pjnath/src/pjnath-test/stun.c	(revision 5535)
@@ -319,4 +319,5 @@
 				&msg, NULL, &res);
     pj_assert(status != PJ_SUCCESS);
+    PJ_UNUSED_ARG(status);
     pj_assert(res != NULL);
 
Index: pjproject/trunk/pjnath/src/pjnath/errno.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/errno.c	(revision 5534)
+++ pjproject/trunk/pjnath/src/pjnath/errno.c	(revision 5535)
@@ -185,5 +185,5 @@
     pj_assert(status == PJ_SUCCESS);
 
-    return PJ_SUCCESS;
+    return status;
 }
 
Index: pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c	(revision 5534)
+++ pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c	(revision 5535)
@@ -208,8 +208,4 @@
     if (app_config.cli_cfg.cli_fe & CLI_FE_TELNET) {
 	pj_cli_telnet_cfg *fe_cfg = &app_config.cli_cfg.telnet_cfg;
-	pj_pool_t *pool;
-
-	pool = pj_pool_create(cfg->pf, "cli_cp", 128, 128, NULL);
-	pj_assert(pool);
 
 	status = pj_cli_telnet_create(cli, fe_cfg, &telnet_front_end);
Index: pjproject/trunk/pjsip-apps/src/samples/aectest.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/aectest.c	(revision 5534)
+++ pjproject/trunk/pjsip-apps/src/samples/aectest.c	(revision 5535)
@@ -301,4 +301,5 @@
 	puts("ENTER to quit");
 	dummy = fgets(s, sizeof(s), stdin);
+	PJ_UNUSED_ARG(dummy);
     }
 
Index: pjproject/trunk/pjsip-apps/src/samples/auddemo.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/auddemo.c	(revision 5534)
+++ pjproject/trunk/pjsip-apps/src/samples/auddemo.c	(revision 5535)
@@ -297,4 +297,5 @@
     PJ_LOG(3,(THIS_FILE, "Recording started, press ENTER to stop"));
     dummy = fgets(line, sizeof(line), stdin);
+    PJ_UNUSED_ARG(dummy);
 
 on_return:
@@ -364,4 +365,5 @@
     PJ_LOG(3,(THIS_FILE, "Playback started, press ENTER to stop"));
     dummy = fgets(line, sizeof(line), stdin);
+    PJ_UNUSED_ARG(dummy);
 
 on_return:
Index: pjproject/trunk/pjsip-apps/src/samples/aviplay.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/aviplay.c	(revision 5534)
+++ pjproject/trunk/pjsip-apps/src/samples/aviplay.c	(revision 5535)
@@ -468,5 +468,5 @@
     	puts("Error: filename required");
 	puts(desc);
-	return 1;
+	return 110;
     }
 
@@ -474,5 +474,5 @@
     /* Must init PJLIB first: */
     status = pj_init();
-    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 120);
 
     /* Must create a pool factory before we can allocate any memory. */
@@ -493,9 +493,12 @@
     
     status = pjmedia_vid_dev_subsys_init(&cp.factory);
-    if (status != PJ_SUCCESS)
+    if (status != PJ_SUCCESS) {
+	rc = 130;
         goto on_return;
+    }
     
     status = pjmedia_aud_subsys_init(&cp.factory);
     if (status != PJ_SUCCESS) {
+	rc = 140;
         goto on_return;
     }
@@ -503,12 +506,16 @@
 #if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0
     status = pjmedia_codec_openh264_vid_init(NULL, &cp.factory);
-    if (status != PJ_SUCCESS)
+    if (status != PJ_SUCCESS) {
+	rc = 150;
 	goto on_return;
+    }
 #endif
 
 #if PJMEDIA_HAS_FFMPEG_VID_CODEC
     status = pjmedia_codec_ffmpeg_vid_init(NULL, &cp.factory);
-    if (status != PJ_SUCCESS)
+    if (status != PJ_SUCCESS) {
+	rc = 160;
 	goto on_return;    
+    }
 #endif
 
@@ -549,5 +556,5 @@
 
     /* Done. */
-    return 0;
+    return rc;
 }
 
Index: pjproject/trunk/pjsip-apps/src/samples/pjsip-perf.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/pjsip-perf.c	(revision 5534)
+++ pjproject/trunk/pjsip-apps/src/samples/pjsip-perf.c	(revision 5535)
@@ -1476,4 +1476,5 @@
 	    status = submit_job();
 	}
+	PJ_UNUSED_ARG(status);
 
 	++app.client.job_submitted;
Index: pjproject/trunk/pjsip-apps/src/samples/siprtp.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 5534)
+++ pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 5535)
@@ -1398,5 +1398,4 @@
 {
     struct call *call;
-    pj_pool_t *pool;
     struct media_stream *audio;
     const pjmedia_sdp_session *local_sdp, *remote_sdp;
@@ -1405,5 +1404,4 @@
 
     call = inv->mod_data[mod_siprtp.id];
-    pool = inv->dlg->pool;
     audio = &call->media[0];
 
Index: pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c	(revision 5534)
+++ pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c	(revision 5535)
@@ -191,4 +191,5 @@
 						 &recv_pkt->rdata);
 	pj_assert(size_eaten == recv_pkt->rdata.pkt_info.len);
+	PJ_UNUSED_ARG(size_eaten);
 
 	pjsip_endpt_release_pool(loop->base.endpt, 
@@ -337,4 +338,5 @@
 	    /* Must "eat" all the packets. */
 	    pj_assert(size_eaten == node->rdata.pkt_info.len);
+	    PJ_UNUSED_ARG(size_eaten);
 
 	    /* Done. */
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 5534)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 5535)
@@ -2600,4 +2600,5 @@
 				uri, acc->cfg.reg_uri.slen+10);
 	    pj_assert(d > 0);
+	    PJ_UNUSED_ARG(d);
 
 	    h = pjsip_authorization_hdr_create(tdata->pool);
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 5534)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 5535)
@@ -3317,4 +3317,5 @@
 	/* Verify that media must be active. */
 	pj_assert(loc_m->desc.port && rem_m->desc.port);
+	PJ_UNUSED_ARG(loc_m);
 
 	/* Count the formats in the answer. */
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 5534)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 5535)
@@ -2252,4 +2252,6 @@
     if (call->inv && call->inv->neg)
 	sdp_neg_state = pjmedia_sdp_neg_get_state(call->inv->neg);
+
+    PJ_UNUSED_ARG(sdp_neg_state);
 
     /* Get one address to use in the origin field */
Index: pjproject/trunk/pjsip/src/test/inv_offer_answer_test.c
===================================================================
--- pjproject/trunk/pjsip/src/test/inv_offer_answer_test.c	(revision 5534)
+++ pjproject/trunk/pjsip/src/test/inv_offer_answer_test.c	(revision 5535)
@@ -185,4 +185,5 @@
     status = pjmedia_sdp_parse(pool, dup.ptr, dup.slen, &sdp);
     pj_assert(status == PJ_SUCCESS);
+    PJ_UNUSED_ARG(status);
 
     return sdp;
@@ -336,5 +337,5 @@
 	pj_assert(status == PJ_SUCCESS);
 
-	return PJ_TRUE;
+	return (status == PJ_SUCCESS);
     }
 
@@ -393,4 +394,5 @@
 	break;
     }
+    PJ_UNUSED_ARG(status);
 }
 
@@ -677,4 +679,5 @@
 	status = pjsip_udp_transport_start(endpt, &addr, NULL, 1, &tp);
 	pj_assert(status == PJ_SUCCESS);
+	PJ_UNUSED_ARG(status);
     }
 
Index: pjproject/trunk/pjsip/src/test/regc_test.c
===================================================================
--- pjproject/trunk/pjsip/src/test/regc_test.c	(revision 5534)
+++ pjproject/trunk/pjsip/src/test/regc_test.c	(revision 5535)
@@ -205,5 +205,5 @@
     pj_assert(status == PJ_SUCCESS);
 
-    return PJ_TRUE;
+    return (status == PJ_SUCCESS);
 }
 
@@ -243,4 +243,5 @@
     status = pjsip_regc_get_info(param->regc, &info);
     pj_assert(status == PJ_SUCCESS);
+    PJ_UNUSED_ARG(status);
 
     client->error = (param->status != PJ_SUCCESS);
Index: pjproject/trunk/pjsip/src/test/tsx_uac_test.c
===================================================================
--- pjproject/trunk/pjsip/src/test/tsx_uac_test.c	(revision 5534)
+++ pjproject/trunk/pjsip/src/test/tsx_uac_test.c	(revision 5535)
@@ -778,6 +778,5 @@
 	pjsip_endpt_schedule_timer(endpt, &timer.entry, &delay);
 
-	return PJ_TRUE;
-
+	return (status == PJ_SUCCESS);
 
     } else
@@ -851,5 +850,5 @@
 	 */
 	pjsip_method *method;
-	pj_status_t status;
+	pj_status_t status = PJ_SUCCESS;
 
 	method = &rdata->msg_info.msg->line.req.method;
@@ -934,5 +933,5 @@
 	}
 
-	return PJ_TRUE;
+	return (status == PJ_SUCCESS);
 
     }
