aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c
diff options
context:
space:
mode:
authorMiroslav Rezanina <mrezanin@redhat.com>2020-01-21 10:28:14 +0100
committerLaurent Vivier <laurent@vivier.eu>2020-02-06 11:13:24 +0100
commitf821bac4af692e88137722bbf8e601337b9e1722 (patch)
treef430156cdf6efe442e4362f4cfa3ded0450f1837 /hw/i2c
parentb7709d0e0ac08965662979d8f351e168fc809cd7 (diff)
downloadqemu-f821bac4af692e88137722bbf8e601337b9e1722.zip
qemu-f821bac4af692e88137722bbf8e601337b9e1722.tar.gz
qemu-f821bac4af692e88137722bbf8e601337b9e1722.tar.bz2
aspeed/i2c: Prevent uninitialized warning
Compiler reports uninitialized warning for cmd_flags variable. Adding NULL initialization to prevent this warning. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <07957dcab31f65de3dd30efa91e6b9152ac79879.1579598240.git.mrezanin@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/i2c')
-rw-r--r--hw/i2c/aspeed_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index 9cda968..fb973a9 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -400,7 +400,7 @@ static bool aspeed_i2c_check_sram(AspeedI2CBus *bus)
static void aspeed_i2c_bus_cmd_dump(AspeedI2CBus *bus)
{
- g_autofree char *cmd_flags;
+ g_autofree char *cmd_flags = NULL;
uint32_t count;
if (bus->cmd & (I2CD_RX_BUFF_ENABLE | I2CD_RX_BUFF_ENABLE)) {