From 18fac5458c89f62ce713f669560536cfaba3efe2 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Fri, 6 Aug 2010 07:18:08 +0000 Subject: 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 --- pjlib/src/pj/errno.c | 2 +- pjlib/src/pj/log.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'pjlib/src') 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) { -- cgit v1.2.3