From 24a42f5b6787650ecc4c31e7382eaaace1b96d93 Mon Sep 17 00:00:00 2001 From: winckel <winckel@eurecom.fr> Date: Wed, 4 Dec 2013 08:29:14 +0000 Subject: [PATCH] Fixed some warnings for RTAI build. git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4575 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair2/UTIL/LOG/log.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openair2/UTIL/LOG/log.c b/openair2/UTIL/LOG/log.c index 2cac79553e..46d19f08df 100755 --- a/openair2/UTIL/LOG/log.c +++ b/openair2/UTIL/LOG/log.c @@ -76,7 +76,9 @@ int log_list_head = 0; int log_shutdown; #endif +#ifndef RTAI static int gfd; +#endif static char *log_level_highlight_start[] = {LOG_RED, LOG_RED, LOG_RED, LOG_RED, LOG_ORANGE, LOG_BLUE, "", ""}; /*!< \brief Optional start-format strings for highlighting */ static char *log_level_highlight_end[] = {LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET,LOG_RESET, "",""}; /*!< \brief Optional end-format strings for highlighting */ @@ -88,7 +90,9 @@ static log_instance_type_t log_instance_type; int logInit (void) { #ifdef USER_MODE +#ifndef RTAI int i; +#endif g_log = calloc(1, sizeof(log_t)); #else @@ -637,7 +641,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, rtf_put (FIFO_PRINTF_NO, c->log_buffer, len); } #else - fprintf(stdout, "%s", c->log_buffer); + fwrite(c->log_buffer, len, 1, stdout); #endif #ifndef RTAI @@ -926,10 +930,11 @@ int is_newline( char *str, int size) void logClean (void) { - int i; #ifdef RTAI rtf_destroy (FIFO_PRINTF_NO); #else + int i; + if (g_log->syslog) { closelog(); } -- GitLab