summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2010-08-06 07:18:08 +0000
committerNanang Izzuddin <nanang@teluu.com>2010-08-06 07:18:08 +0000
commit18fac5458c89f62ce713f669560536cfaba3efe2 (patch)
treef3653d3b78c78cafcae3bf16e10f466224193c1a
parent6938680706bd20311a32ce476570c0cf44ee1ba3 (diff)
Misc (re #1068): fix compile errors/warnings on Symbian S60 5th ed.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3255 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--build.symbian/libgsmcodec.mmp1
-rw-r--r--pjlib/src/pj/errno.c2
-rw-r--r--pjlib/src/pj/log.c8
-rw-r--r--pjmedia/src/pjmedia/wsola.c2
-rw-r--r--pjsip/src/pjsip-simple/presence_body.c2
-rw-r--r--pjsip/src/pjsip/sip_multipart.c4
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c6
7 files changed, 15 insertions, 10 deletions
diff --git a/build.symbian/libgsmcodec.mmp b/build.symbian/libgsmcodec.mmp
index 1b301f8c..875555bd 100644
--- a/build.symbian/libgsmcodec.mmp
+++ b/build.symbian/libgsmcodec.mmp
@@ -64,6 +64,7 @@ SOURCE gsm.c
SYSTEMINCLUDE ..\pjmedia\include
SYSTEMINCLUDE ..\pjlib\include
+SYSTEMINCLUDE ..\third_party\build\gsm
SYSTEMINCLUDE ..\third_party\gsm\inc
SYSTEMINCLUDE \epoc32\include
diff --git a/pjlib/src/pj/errno.c b/pjlib/src/pj/errno.c
index 667c7d91..e36b3266 100644
--- a/pjlib/src/pj/errno.c
+++ b/pjlib/src/pj/errno.c
@@ -217,7 +217,7 @@ static void pj_perror_imp(int log_level, const char *sender,
/* Build the title */
len = pj_ansi_vsnprintf(titlebuf, sizeof(titlebuf), title_fmt, marker);
- if (len < 0 || len >= sizeof(titlebuf))
+ if (len < 0 || len >= (int)sizeof(titlebuf))
pj_ansi_strcpy(titlebuf, "Error");
/* Get the error */
diff --git a/pjlib/src/pj/log.c b/pjlib/src/pj/log.c
index 0db0d169..998ba6a1 100644
--- a/pjlib/src/pj/log.c
+++ b/pjlib/src/pj/log.c
@@ -30,7 +30,11 @@ PJ_DEF_DATA(int) pj_log_max_level = PJ_LOG_MAX_LEVEL;
#else
static int pj_log_max_level = PJ_LOG_MAX_LEVEL;
#endif
+
+#if PJ_HAS_THREADS
static long thread_suspended_tls_id = -1;
+#endif
+
static pj_log_func *log_writer = &pj_log_write;
static unsigned log_decor = PJ_LOG_HAS_TIME | PJ_LOG_HAS_MICRO_SEC |
PJ_LOG_HAS_SENDER | PJ_LOG_HAS_NEWLINE |
@@ -67,15 +71,15 @@ static pj_color_t PJ_LOG_COLOR_77 = PJ_TERM_COLOR_R |
static char log_buffer[PJ_LOG_MAX_SIZE];
#endif
+#if PJ_HAS_THREADS
static void logging_shutdown(void)
{
-#if PJ_HAS_THREADS
if (thread_suspended_tls_id != -1) {
pj_thread_local_free(thread_suspended_tls_id);
thread_suspended_tls_id = -1;
}
-#endif
}
+#endif
pj_status_t pj_log_init(void)
{
diff --git a/pjmedia/src/pjmedia/wsola.c b/pjmedia/src/pjmedia/wsola.c
index e27233e4..0a27bd72 100644
--- a/pjmedia/src/pjmedia/wsola.c
+++ b/pjmedia/src/pjmedia/wsola.c
@@ -850,7 +850,7 @@ PJ_DEF(pj_status_t) pjmedia_wsola_save( pjmedia_wsola *wsola,
/* Continue applying fade out to the extra samples */
if (reg2_len == 0) {
wsola_fade_out(wsola, reg1 + reg1_len - count, count);
- } else if ((int)reg2_len >= count) {
+ } else if (reg2_len >= count) {
wsola_fade_out(wsola, reg2 + reg2_len - count, count);
} else {
unsigned tmp = count - reg2_len;
diff --git a/pjsip/src/pjsip-simple/presence_body.c b/pjsip/src/pjsip-simple/presence_body.c
index 20e74458..a57e8df9 100644
--- a/pjsip/src/pjsip-simple/presence_body.c
+++ b/pjsip/src/pjsip-simple/presence_body.c
@@ -126,7 +126,7 @@ PJ_DEF(pj_status_t) pjsip_pres_create_pidf( pj_pool_t *pool,
"%04d-%02d-%02dT%02d:%02d:%02d.%03dZ",
pt.year, pt.mon+1, pt.day,
pt.hour, pt.min, pt.sec, pt.msec);
- if (tslen > 0 && tslen < sizeof(buf)) {
+ if (tslen > 0 && tslen < (int)sizeof(buf)) {
pj_str_t time = pj_str(buf);
pjpidf_tuple_set_timestamp(pool, pidf_tuple, &time);
}
diff --git a/pjsip/src/pjsip/sip_multipart.c b/pjsip/src/pjsip/sip_multipart.c
index b5d1f540..e9aa76e2 100644
--- a/pjsip/src/pjsip/sip_multipart.c
+++ b/pjsip/src/pjsip/sip_multipart.c
@@ -191,7 +191,7 @@ static void* multipart_clone_data(pj_pool_t *pool, const void *data,
src_hdr = src_part->hdr.next;
while (src_hdr != &src_part->hdr) {
- pjsip_hdr *dst_hdr = pjsip_hdr_clone(pool, src_hdr);
+ pjsip_hdr *dst_hdr = (pjsip_hdr*)pjsip_hdr_clone(pool, src_hdr);
pj_list_push_back(&dst_part->hdr, dst_hdr);
src_hdr = src_hdr->next;
}
@@ -485,7 +485,7 @@ static pjsip_multipart_part *parse_multipart_part(pj_pool_t *pool,
part->body->data = start_body;
part->body->len = end - start_body;
} else {
- part->body->data = "";
+ part->body->data = (void*)"";
part->body->len = 0;
}
TRACE_((THIS_FILE, "Body parsed: \"%.*s\"", (int)part->body->len,
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 3150d977..368996d1 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -1307,7 +1307,7 @@ PJ_DEF(pj_status_t) pjsua_destroy(void)
*/
/* First stage, get the maximum wait time */
max_wait = 100;
- for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+ for (i=0; i<(int)PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
if (!pjsua_var.acc[i].valid)
continue;
if (pjsua_var.acc[i].cfg.unpublish_max_wait_time_msec > max_wait)
@@ -1331,7 +1331,7 @@ PJ_DEF(pj_status_t) pjsua_destroy(void)
}
/* Third stage, forcefully destroy unfinished unpublications */
- for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+ for (i=0; i<(int)PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
if (pjsua_var.acc[i].publish_sess) {
pjsip_publishc_destroy(pjsua_var.acc[i].publish_sess);
pjsua_var.acc[i].publish_sess = NULL;
@@ -1361,7 +1361,7 @@ PJ_DEF(pj_status_t) pjsua_destroy(void)
/* Wait until all unregistrations are done (ticket #364) */
/* First stage, get the maximum wait time */
max_wait = 100;
- for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+ for (i=0; i<(int)PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
if (!pjsua_var.acc[i].valid)
continue;
if (pjsua_var.acc[i].cfg.unreg_timeout > max_wait)