mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
rombios/tcgbios: initialise size in tcpa_extend_acpi_log
Gcc complains: tcgbios.c:362:3: error: ‘size’ may be used uninitialized in this function [-Werror=maybe-uninitialized] memcpy((char *)lasa_last, (char *)entry_ptr, size); It fails to figure out if size is used in memcpy it is always initialised. 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
b2fc97e2d2
commit
bdb2a56104
1 file changed
+1
-1
@@ -330,7 +330,7 @@ uint32_t tcpa_extend_acpi_log(uint32_t entry_ptr)
|
||||
uint32_t res = 0;
|
||||
unsigned char *lasa_last = tcpa_get_lasa_last_ptr();
|
||||
unsigned char *lasa_base = tcpa_get_lasa_base_ptr();
|
||||
uint32_t size;
|
||||
uint32_t size = 0;
|
||||
uint16_t entry_count = tcpa_acpi.entry_count;
|
||||
struct pcpes *pcpes = (struct pcpes *)entry_ptr;
|
||||
|
||||
|
||||