michallenc opened a new pull request, #16820:
URL: https://github.com/apache/nuttx/pull/16820
## Summary
Use typedef `syslog_channel_t` instead of `struct syslog_channel_s`. The
error occurred if `CONFIG_SYSLOG_CDCACM` was set.
```console
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’)
```
## Impact
Fixes build.
## Testing
Any build with `CONFIG_SYSLOG_CDCACM` enabled. CDC ACM syslog compiles after
the change and works (more or less, but that's a different issue).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]