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

[Xen-changelog] [xen master] rombios/tcgbios: initialise entry in HashLogEvent32



commit 1d97ced2a0d0d27f084e33953402328df523acd1
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri Apr 29 16:11:13 2016 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri May 6 15:50:15 2016 +0100

    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>
    Reviewed-by: Doug Goldstein <cardoe@xxxxxxxxxx>
    Release-acked-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;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

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