This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 1c1b814a9ae drivers/syslog/syslog_channel.c: fix incompatible-pointer-types compile errors 1c1b814a9ae is described below commit 1c1b814a9ae6f12d9b401d19678da63be7617bf6 Author: Michal Lenc <michall...@seznam.cz> AuthorDate: Thu Aug 7 09:51:25 2025 +0200 drivers/syslog/syslog_channel.c: fix incompatible-pointer-types compile errors Use typedef syslog_channel_t instead of struct syslog_channel_s. CC: dirent/lib_telldir.c syslog/syslog_channel.c:151:3: error: initialization of ‘int (*)(const syslog_channel_t *, int)’ {aka ‘int (*)(const struct syslog_channel_s *, int)’} from incompatible pointer type ‘int (*)(struct syslog_channel_s *, int)’ [-Wincompatible-pointer-types] 151 | syslog_cdcacm_putc, | ^~~~~~~~~~~~~~~~~~ syslog/syslog_channel.c:151:3: note: (near initialization for ‘g_cdcacm_channel_ops.sc_putc’) syslog/syslog_channel.c:152:3: error: initialization of ‘int (*)(const syslog_channel_t *, int)’ {aka ‘int (*)(const struct syslog_channel_s *, int)’} from incompatible pointer type ‘int (*)(struct syslog_channel_s *, int)’ [-Wincompatible-pointer-types] 152 | syslog_cdcacm_putc, | ^~~~~~~~~~~~~~~~~~ syslog/syslog_channel.c:152:3: note: (near initialization for ‘g_cdcacm_channel_ops.sc_force’) syslog/syslog_channel.c:154:3: error: initialization of ‘ssize_t (*)(const syslog_channel_t *, const char *, size_t)’ {aka ‘int (*)(const struct syslog_channel_s *, const char *, unsigned int)’} from incompatible pointer type ‘ssize_t (*)(struct syslog_channel_s *, const char *, size_t)’ {aka ‘int (*)(struct syslog_channel_s *, const char *, unsigned int)’} [-Wincompatible-pointer-types] 154 | syslog_cdcacm_write, | ^~~~~~~~~~~~~~~~~~~ syslog/syslog_channel.c:154:3: note: (near initialization for ‘g_cdcacm_channel_ops.sc_write’) syslog/syslog_channel.c:155:3: error: initialization of ‘ssize_t (*)(const syslog_channel_t *, const char *, size_t)’ {aka ‘int (*)(const struct syslog_channel_s *, const char *, unsigned int)’} from incompatible pointer type ‘ssize_t (*)(struct syslog_channel_s *, const char *, size_t)’ {aka ‘int (*)(struct syslog_channel_s *, const char *, unsigned int)’} [-Wincompatible-pointer-types] 155 | syslog_cdcacm_write | ^~~~~~~~~~~~~~~~~~~ syslog/syslog_channel.c:155:3: note: (near initialization for ‘g_cdcacm_channel_ops.sc_write_force’) syslog/syslog_channel.c:243:3: warning: excess elements in array initializer 243 | &g_cdcacm_channel | ^ syslog/syslog_channel.c:243:3: note: (near initialization for ‘g_syslog_channel’) Signed-off-by: Michal Lenc <michall...@seznam.cz> --- drivers/syslog/syslog_channel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index 6bd80e6f5a0..1abb3097fce 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -69,9 +69,9 @@ static ssize_t syslog_default_write(FAR syslog_channel_t *channel, #endif #ifdef CONFIG_SYSLOG_CDCACM -static int syslog_cdcacm_putc(FAR struct syslog_channel_s *channel, +static int syslog_cdcacm_putc(FAR syslog_channel_t *channel, int ch); -static ssize_t syslog_cdcacm_write(FAR struct syslog_channel_s *channel, +static ssize_t syslog_cdcacm_write(FAR syslog_channel_t *channel, FAR const char *buffer, size_t buflen); #endif @@ -331,7 +331,7 @@ static ssize_t syslog_default_write(FAR syslog_channel_t *channel, #endif #ifdef CONFIG_SYSLOG_CDCACM -static int syslog_cdcacm_putc(FAR struct syslog_channel_s *channel, int ch) +static int syslog_cdcacm_putc(FAR syslog_channel_t *channel, int ch) { char tmp; @@ -342,7 +342,7 @@ static int syslog_cdcacm_putc(FAR struct syslog_channel_s *channel, int ch) return ch; } -static ssize_t syslog_cdcacm_write(FAR struct syslog_channel_s *channel, +static ssize_t syslog_cdcacm_write(FAR syslog_channel_t *channel, FAR const char *buffer, size_t buflen) { UNUSED(channel);