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
This commit is contained in:
Nanang Izzuddin 2010-08-06 07:18:08 +00:00
parent fbe1d222c1
commit d1f054e473
7 changed files with 15 additions and 10 deletions

View File

@ -64,6 +64,7 @@ SOURCE gsm.c
SYSTEMINCLUDE ..\pjmedia\include SYSTEMINCLUDE ..\pjmedia\include
SYSTEMINCLUDE ..\pjlib\include SYSTEMINCLUDE ..\pjlib\include
SYSTEMINCLUDE ..\third_party\build\gsm
SYSTEMINCLUDE ..\third_party\gsm\inc SYSTEMINCLUDE ..\third_party\gsm\inc
SYSTEMINCLUDE \epoc32\include SYSTEMINCLUDE \epoc32\include

View File

@ -217,7 +217,7 @@ static void pj_perror_imp(int log_level, const char *sender,
/* Build the title */ /* Build the title */
len = pj_ansi_vsnprintf(titlebuf, sizeof(titlebuf), title_fmt, marker); 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"); pj_ansi_strcpy(titlebuf, "Error");
/* Get the error */ /* Get the error */

View File

@ -30,7 +30,11 @@ PJ_DEF_DATA(int) pj_log_max_level = PJ_LOG_MAX_LEVEL;
#else #else
static int pj_log_max_level = PJ_LOG_MAX_LEVEL; static int pj_log_max_level = PJ_LOG_MAX_LEVEL;
#endif #endif
#if PJ_HAS_THREADS
static long thread_suspended_tls_id = -1; static long thread_suspended_tls_id = -1;
#endif
static pj_log_func *log_writer = &pj_log_write; static pj_log_func *log_writer = &pj_log_write;
static unsigned log_decor = PJ_LOG_HAS_TIME | PJ_LOG_HAS_MICRO_SEC | static unsigned log_decor = PJ_LOG_HAS_TIME | PJ_LOG_HAS_MICRO_SEC |
PJ_LOG_HAS_SENDER | PJ_LOG_HAS_NEWLINE | 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]; static char log_buffer[PJ_LOG_MAX_SIZE];
#endif #endif
#if PJ_HAS_THREADS
static void logging_shutdown(void) static void logging_shutdown(void)
{ {
#if PJ_HAS_THREADS
if (thread_suspended_tls_id != -1) { if (thread_suspended_tls_id != -1) {
pj_thread_local_free(thread_suspended_tls_id); pj_thread_local_free(thread_suspended_tls_id);
thread_suspended_tls_id = -1; thread_suspended_tls_id = -1;
} }
#endif
} }
#endif
pj_status_t pj_log_init(void) pj_status_t pj_log_init(void)
{ {

View File

@ -850,7 +850,7 @@ PJ_DEF(pj_status_t) pjmedia_wsola_save( pjmedia_wsola *wsola,
/* Continue applying fade out to the extra samples */ /* Continue applying fade out to the extra samples */
if (reg2_len == 0) { if (reg2_len == 0) {
wsola_fade_out(wsola, reg1 + reg1_len - count, count); 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); wsola_fade_out(wsola, reg2 + reg2_len - count, count);
} else { } else {
unsigned tmp = count - reg2_len; unsigned tmp = count - reg2_len;

View File

@ -126,7 +126,7 @@ PJ_DEF(pj_status_t) pjsip_pres_create_pidf( pj_pool_t *pool,
"%04d-%02d-%02dT%02d:%02d:%02d.%03dZ", "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ",
pt.year, pt.mon+1, pt.day, pt.year, pt.mon+1, pt.day,
pt.hour, pt.min, pt.sec, pt.msec); 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); pj_str_t time = pj_str(buf);
pjpidf_tuple_set_timestamp(pool, pidf_tuple, &time); pjpidf_tuple_set_timestamp(pool, pidf_tuple, &time);
} }

View File

@ -191,7 +191,7 @@ static void* multipart_clone_data(pj_pool_t *pool, const void *data,
src_hdr = src_part->hdr.next; src_hdr = src_part->hdr.next;
while (src_hdr != &src_part->hdr) { 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); pj_list_push_back(&dst_part->hdr, dst_hdr);
src_hdr = src_hdr->next; 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->data = start_body;
part->body->len = end - start_body; part->body->len = end - start_body;
} else { } else {
part->body->data = ""; part->body->data = (void*)"";
part->body->len = 0; part->body->len = 0;
} }
TRACE_((THIS_FILE, "Body parsed: \"%.*s\"", (int)part->body->len, TRACE_((THIS_FILE, "Body parsed: \"%.*s\"", (int)part->body->len,

View File

@ -1307,7 +1307,7 @@ PJ_DEF(pj_status_t) pjsua_destroy(void)
*/ */
/* First stage, get the maximum wait time */ /* First stage, get the maximum wait time */
max_wait = 100; 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) if (!pjsua_var.acc[i].valid)
continue; continue;
if (pjsua_var.acc[i].cfg.unpublish_max_wait_time_msec > max_wait) 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 */ /* 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) { if (pjsua_var.acc[i].publish_sess) {
pjsip_publishc_destroy(pjsua_var.acc[i].publish_sess); pjsip_publishc_destroy(pjsua_var.acc[i].publish_sess);
pjsua_var.acc[i].publish_sess = NULL; 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) */ /* Wait until all unregistrations are done (ticket #364) */
/* First stage, get the maximum wait time */ /* First stage, get the maximum wait time */
max_wait = 100; 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) if (!pjsua_var.acc[i].valid)
continue; continue;
if (pjsua_var.acc[i].cfg.unreg_timeout > max_wait) if (pjsua_var.acc[i].cfg.unreg_timeout > max_wait)