forked from len0rd/rockbox
Always initialize "item"
Otherwise item.cfg_name and item.default_val will contain garbage. It doesn't seem to have an effect right now, but who knows what a future refactoring might do. cppcheck reported: [rockbox/apps/settings.c:1268]: (error) Uninitialized variable: item Change-Id: Ic4d0c302929613de8f291cd2d69cd39db8711107
This commit is contained in:
parent
9a5f7ce0f2
commit
06eeab0242
1 changed files with 1 additions and 0 deletions
|
@ -1255,6 +1255,7 @@ bool set_option(const char* string, const void* variable, enum optiontype type,
|
||||||
function, UNIT_INT, 0, numoptions-1, 1,
|
function, UNIT_INT, 0, numoptions-1, 1,
|
||||||
set_option_formatter, set_option_get_talk_id
|
set_option_formatter, set_option_get_talk_id
|
||||||
};
|
};
|
||||||
|
memset(item, 0, sizeof(struct settings_list));
|
||||||
set_option_options = options;
|
set_option_options = options;
|
||||||
item.int_setting = &data;
|
item.int_setting = &data;
|
||||||
item.flags = F_INT_SETTING|F_T_INT;
|
item.flags = F_INT_SETTING|F_T_INT;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue