summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2015-03-27 06:17:27 +0000
committerNanang Izzuddin <nanang@teluu.com>2015-03-27 06:17:27 +0000
commit32669005e5809e7f0825bf3b0d0e79a7e30e0abf (patch)
treedee3037a378929be3e83664b8d9d3bfcb7ce362b /pjsip-apps
parent51e1fcf85d019d80cb0b827ce7380a2c7ee9027f (diff)
Re #1828: Fixed misc compile warnings (on iOS).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5035 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/pjsystest/main_console.c2
-rw-r--r--pjsip-apps/src/samples/pcaputil.c2
-rw-r--r--pjsip-apps/src/samples/pjsip-perf.c6
-rw-r--r--pjsip-apps/src/samples/siprtp.c5
4 files changed, 6 insertions, 9 deletions
diff --git a/pjsip-apps/src/pjsystest/main_console.c b/pjsip-apps/src/pjsystest/main_console.c
index 6c1aa6e8..122cdc72 100644
--- a/pjsip-apps/src/pjsystest/main_console.c
+++ b/pjsip-apps/src/pjsystest/main_console.c
@@ -99,7 +99,7 @@ pj_status_t gui_start(gui_menu *menu)
choice = menu;
while (*p && *p!='\r' && *p!='\n') {
unsigned d = (*p - '0');
- if (d < 0 || d >= choice->submenu_cnt) {
+ if (d >= choice->submenu_cnt) {
puts("Invalid selection");
choice = NULL;
break;
diff --git a/pjsip-apps/src/samples/pcaputil.c b/pjsip-apps/src/samples/pcaputil.c
index bb231127..86a58010 100644
--- a/pjsip-apps/src/samples/pcaputil.c
+++ b/pjsip-apps/src/samples/pcaputil.c
@@ -307,7 +307,7 @@ static void pcap2wav(const pj_str_t *codec,
/* Get codec info and param for the specified payload type */
app.pt = pkt0.rtp->pt;
- if (app.pt >=0 && app.pt < 96) {
+ if (app.pt < 96) {
T( pjmedia_codec_mgr_get_codec_info(cmgr, pkt0.rtp->pt, &ci) );
} else {
unsigned cnt = 2;
diff --git a/pjsip-apps/src/samples/pjsip-perf.c b/pjsip-apps/src/samples/pjsip-perf.c
index 2a435cfe..974e9337 100644
--- a/pjsip-apps/src/samples/pjsip-perf.c
+++ b/pjsip-apps/src/samples/pjsip-perf.c
@@ -1215,10 +1215,6 @@ static pj_status_t init_options(int argc, char *argv[])
case 'c':
app.client.job_count = my_atoi(pj_optarg);
- if (app.client.job_count < 0) {
- PJ_LOG(3,(THIS_FILE, "Invalid --local-port %s", pj_optarg));
- return -1;
- }
if (app.client.job_count > pjsip_cfg()->tsx.max_count)
PJ_LOG(3,(THIS_FILE,
"Warning: --count value (%d) exceeds maximum "
@@ -1259,7 +1255,7 @@ static pj_status_t init_options(int argc, char *argv[])
case 't':
app.client.timeout = my_atoi(pj_optarg);
- if (app.client.timeout < 0 || app.client.timeout > 600) {
+ if (app.client.timeout > 600) {
PJ_LOG(3,(THIS_FILE, "Invalid --timeout %s", pj_optarg));
return -1;
}
diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c
index f783b6aa..1bee1f5c 100644
--- a/pjsip-apps/src/samples/siprtp.c
+++ b/pjsip-apps/src/samples/siprtp.c
@@ -914,8 +914,9 @@ static pj_status_t init_options(int argc, char *argv[])
switch (c) {
case 'c':
app.max_calls = atoi(pj_optarg);
- if (app.max_calls < 0 || app.max_calls > MAX_CALLS) {
- PJ_LOG(3,(THIS_FILE, "Invalid max calls value %s", pj_optarg));
+ if (app.max_calls > MAX_CALLS) {
+ PJ_LOG(3,(THIS_FILE,"Invalid max calls value %s "
+ "(must be <= %d)", pj_optarg, MAX_CALLS));
return 1;
}
break;