[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH for-4.7 2/6] rombios/tcgbios: initialise entry in HashLogEvent32



Gcc complains:

tcgbios.c:1142:22: error: ‘entry’ may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
    hleo->eventnumber = entry;

It fails to figure out if entry is used it is always initialised in
previous if block.

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 d1d1203..3501051 100644
--- a/tools/firmware/rombios/32bit/tcgbios/tcgbios.c
+++ b/tools/firmware/rombios/32bit/tcgbios/tcgbios.c
@@ -1100,7 +1100,7 @@ uint32_t HashLogEvent32(struct hlei *hlei, struct hleo 
*hleo,
        }
 
        if (rc == 0) {
-               uint32_t entry;
+               uint32_t entry = 0;
                hashdataptr = hlei->hashdataptr;
                hashdatalen = hlei->hashdatalen;
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.