[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.7 1/6] 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@xxxxxxxxxx> --- tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware/rombios/32bit/tcgbios/tcgbios.c b/tools/firmware/rombios/32bit/tcgbios/tcgbios.c index beef5a4..d1d1203 100644 --- a/tools/firmware/rombios/32bit/tcgbios/tcgbios.c +++ b/tools/firmware/rombios/32bit/tcgbios/tcgbios.c @@ -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; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |