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
|
@ -202,10 +202,10 @@ struct init_entry {
|
|||
*
|
||||
* @see SYS_INIT()
|
||||
*/
|
||||
#define SYS_INIT_NAMED(name, init_fn_, level, prio) \
|
||||
static const Z_DECL_ALIGN(struct init_entry) \
|
||||
Z_INIT_ENTRY_SECTION(level, prio, 0) __used __noasan \
|
||||
Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}}
|
||||
#define SYS_INIT_NAMED(name, init_fn_, level, prio) \
|
||||
static const Z_DECL_ALIGN(struct init_entry) \
|
||||
Z_INIT_ENTRY_SECTION(level, prio, 0) __used __noasan \
|
||||
Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}, .dev = NULL}
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
Loading…
Reference in a new issue