init: add missing initialization of dev pointer in SYS_INIT macro
When the -Werror=missing-field-initializers is enabled, the compiler complains about missing initialization of dev pointer in the init_entry struct when using the SYS_INIT[_NAMED] macro. This commit adds explicit assignment of NULL to it. Signed-off-by: Michał Barnaś <barnas@google.com>
This commit is contained in:
parent
2c70c5d74a
commit
2438dbb613
1 changed files with 4 additions and 4 deletions
|
|
@ -205,7 +205,7 @@ struct init_entry {
|
||||||
#define SYS_INIT_NAMED(name, init_fn_, level, prio) \
|
#define SYS_INIT_NAMED(name, init_fn_, level, prio) \
|
||||||
static const Z_DECL_ALIGN(struct init_entry) \
|
static const Z_DECL_ALIGN(struct init_entry) \
|
||||||
Z_INIT_ENTRY_SECTION(level, prio, 0) __used __noasan \
|
Z_INIT_ENTRY_SECTION(level, prio, 0) __used __noasan \
|
||||||
Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}}
|
Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}, .dev = NULL}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue