mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
rombios/tcgbios: initialise logdataptr in HashLogEvent32
Gcc complains:
tcgbios.c: In function ‘HashLogEvent32’:
tcgbios.c:1131:10: error: ‘logdataptr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
entry = tcpa_extend_acpi_log(logdataptr);
It fails to figure out when logdataptr is used it is always initialised
in a if block a few line above.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
1d97ced2a0
commit
0b5e769ae3
1 file changed
+1
-1
@@ -1062,7 +1062,7 @@ uint32_t HashLogEvent32(struct hlei *hlei, struct hleo *hleo,
|
||||
{
|
||||
uint32_t rc = 0;
|
||||
uint16_t size;
|
||||
uint32_t logdataptr;
|
||||
uint32_t logdataptr = 0;
|
||||
uint32_t logdatalen;
|
||||
uint32_t hashdataptr;
|
||||
uint32_t hashdatalen;
|
||||
|
||||