mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-03 04:01:22 +08:00
sim/m32r: Initialize "list" variable
The variable "list" is only initialized when arg1 > 0 and when arg1 == 0, an uninitialized value is passed to translate_endian_h2t function. Although this behavior is harmless, this commit adds initialization to avoid a GCC warning ("-Wmaybe-uninitialized").
This commit is contained in:
@ -547,7 +547,7 @@ m32r_trap (SIM_CPU *current_cpu, PCADDR pc, int num)
|
||||
case TARGET_LINUX_SYS_getgroups32:
|
||||
case TARGET_LINUX_SYS_getgroups:
|
||||
{
|
||||
gid_t *list;
|
||||
gid_t *list = NULL;
|
||||
|
||||
if (arg1 > 0)
|
||||
list = (gid_t *) malloc (arg1 * sizeof(gid_t));
|
||||
|
Reference in New Issue
Block a user