]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mm: initialize ol1e in create_grant_pv_mapping() for older compilers
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 14 Sep 2017 16:01:38 +0000 (18:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 14 Sep 2017 16:01:38 +0000 (18:01 +0200)
On gcc 4.4.4:

mm.c: In function \91create_grant_pv_mapping\92:
mm.c:3839: error: \91ol1e.l1\92 may be used uninitialized in this function

While ol1e would not be used uninitialized (because rc needs to be properly
set) we have to accommodate these older compliers.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c

index 5208e7373406e26382d39e4bc1e587dd75c3275a..14dae666642cb8344d97e93b0923ec591d80a178 100644 (file)
@@ -3836,7 +3836,7 @@ int create_grant_pv_mapping(uint64_t addr, unsigned long frame,
 {
     struct vcpu *curr = current;
     struct domain *currd = curr->domain;
-    l1_pgentry_t nl1e, ol1e, *pl1e;
+    l1_pgentry_t nl1e, ol1e = { }, *pl1e;
     struct page_info *page;
     mfn_t gl1mfn;
     int rc = GNTST_general_error;