Misc (re #1068): fix compile errors/warnings on Symbian S60 5th ed.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3255 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/build.symbian/libgsmcodec.mmp b/build.symbian/libgsmcodec.mmp
index 1b301f8..875555b 100644
--- a/build.symbian/libgsmcodec.mmp
+++ b/build.symbian/libgsmcodec.mmp
@@ -64,6 +64,7 @@
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 667c7d9..e36b326 100644
--- a/pjlib/src/pj/errno.c
+++ b/pjlib/src/pj/errno.c
@@ -217,7 +217,7 @@
/* 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 0db0d16..998ba6a 100644
--- a/pjlib/src/pj/log.c
+++ b/pjlib/src/pj/log.c
@@ -30,7 +30,11 @@
#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 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 e27233e..0a27bd7 100644
--- a/pjmedia/src/pjmedia/wsola.c
+++ b/pjmedia/src/pjmedia/wsola.c
@@ -850,7 +850,7 @@
/* 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 20e7445..a57e8df 100644
--- a/pjsip/src/pjsip-simple/presence_body.c
+++ b/pjsip/src/pjsip-simple/presence_body.c
@@ -126,7 +126,7 @@
"%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 b5d1f54..e9aa76e 100644
--- a/pjsip/src/pjsip/sip_multipart.c
+++ b/pjsip/src/pjsip/sip_multipart.c
@@ -191,7 +191,7 @@
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 @@
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 3150d97..368996d 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -1307,7 +1307,7 @@
*/
/* 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 @@
}
/* 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 @@
/* 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)