sim: mips: fix uninitialized register use

In the default case, this code will read from this variable before
it is initialized as a dummy access.  Set it to 0 to fix the compiler
warning.
This commit is contained in:
Mike Frysinger 2021-06-15 00:39:28 -04:00
parent a8a3d90792
commit 7b2298cbd8
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2021-06-16 Mike Frysinger <vapier@gentoo.org>
* dv-tx3904irc.c (tx3904irc_io_write_buffer): Initialize
register_value to 0.
2021-06-16 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.

View File

@ -381,7 +381,7 @@ tx3904irc_io_write_buffer (struct hw *me,
int reg_number = (address - controller->base_address) / 4;
int reg_offset = (address - controller->base_address) % 4;
unsigned_4* register_ptr;
unsigned_4 register_value;
unsigned_4 register_value = 0;
/* fill in entire register_value word */
switch (reg_number)