From e1d1fe454cf27d6b1c2ef5625f1cefc1a9c6ec9d Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Wed, 17 Jun 2020 14:04:45 +0200 Subject: [PATCH] nb/intel/ironlake/raminit.c: initialize 'reply.command' This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/42461 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/northbridge/intel/ironlake/raminit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/northbridge/intel/ironlake/raminit.c b/src/northbridge/intel/ironlake/raminit.c index f1f8aa5e9a..f50adb196d 100644 --- a/src/northbridge/intel/ironlake/raminit.c +++ b/src/northbridge/intel/ironlake/raminit.c @@ -1782,6 +1782,10 @@ static void send_heci_uma_message(struct raminfo *info) u8 field2; u8 unk3[0x48 - 4 - 1]; } __packed reply; + + /* FIXME: recv_heci_message() does not always initialize 'reply' */ + reply.command = 0; + struct uma_message { u8 group_id; u8 cmd;