From 19d9fe9ebc81478b9e7074e9ed6fa8f2070f0004 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 7 Jan 2016 15:35:45 -0700 Subject: intel/skylake: Init variable so GCC knows it's set Even though the data32 variable was getting written by pch_pcr_read(), GCC still flagged it as being used while uninitialized and failed the build. Note that pch_pcr_read() may only set 1 or 2 bytes of data32 in the successful path, depending on the size of the read. Change-Id: Icd6e80d06b9bf4af506d62d55ffe4c5e98634b2b Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/12860 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Ben Gardner --- src/soc/intel/skylake/pcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/intel/skylake/pcr.c b/src/soc/intel/skylake/pcr.c index b6de73c74c..0b92d769d0 100644 --- a/src/soc/intel/skylake/pcr.c +++ b/src/soc/intel/skylake/pcr.c @@ -158,7 +158,7 @@ static int pcr_and_then_or(u8 pid, u16 offset, u32 size, u32 anddata, u32 ordata) { u8 status; - u32 data32; + u32 data32 = 0; status = pch_pcr_read(pid, offset, size, &data32); if (status != 0) -- cgit v1.2.3