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").
diff --git a/sim/m32r/traps.c b/sim/m32r/traps.c
index 267d548..12a87b4 100644
--- a/sim/m32r/traps.c
+++ b/sim/m32r/traps.c
@@ -547,7 +547,7 @@
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));