You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/15 00:38:39 UTC

[incubator-nuttx] branch master updated: syslog:syslog_channel:Fix compiler warnings

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e4b3ad  syslog:syslog_channel:Fix compiler warnings
3e4b3ad is described below

commit 3e4b3ada5e674fc77e5220c5ed0a913cd25103ce
Author: David Sidrane <Da...@NscDg.com>
AuthorDate: Wed Jul 14 15:40:40 2021 -0700

    syslog:syslog_channel:Fix compiler warnings
    
       syslog_channel.c:98:8: error: unknown type name 'sem_t'
       syslog/syslog_channel.c:99:14: error: 'g_syslog_default_sem'
       defined but not used
---
 drivers/syslog/syslog_channel.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c
index c05c4ba..bff3d8d 100644
--- a/drivers/syslog/syslog_channel.c
+++ b/drivers/syslog/syslog_channel.c
@@ -27,6 +27,7 @@
 #include <sys/types.h>
 #include <assert.h>
 #include <errno.h>
+#include <semaphore.h>
 
 #include <nuttx/syslog/syslog.h>
 #include <nuttx/compiler.h>
@@ -95,7 +96,9 @@ static struct syslog_channel_s g_rpmsg_channel =
 #endif
 
 #if defined(CONFIG_SYSLOG_DEFAULT)
+#  if defined(CONFIG_ARCH_LOWPUTC)
 static sem_t g_syslog_default_sem = SEM_INITIALIZER(1);
+#  endif
 
 static const struct syslog_channel_ops_s g_default_channel_ops =
 {