forked from auracaster/openocd
target/arc: fix clang static analyzer warnings
Fixes: * Removed typo in *bitfields initializations. * Removed potentional memory leak allocating reg_data_type_struct_field/reg_data_type_flags_field objects. * Initialize buffers with "0" before usage in buf_set_u32(). * Removed memory leak in jim_arc_add_reg(). Change-Id: Iefde57cd4a48c4f3350c376475df8642607f52ff Signed-off-by: Evgeniy Didin <didin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5480 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
committed by
Oleksij Rempel
parent
9ee9bdd2f9
commit
39d54ee969
@@ -61,6 +61,10 @@ struct arc_reg_data_type {
|
||||
struct reg_data_type_struct data_type_struct;
|
||||
char data_type_id[REG_TYPE_MAX_NAME_LENGTH];
|
||||
struct arc_reg_bitfield *bitfields;
|
||||
union {
|
||||
struct reg_data_type_struct_field *reg_type_struct_field;
|
||||
struct reg_data_type_flags_field *reg_type_flags_field;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user