|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/mm: Initialize ol1e in create_grant_pv_mapping() for older compilers
>>> On 14.09.17 at 16:59, <boris.ostrovsky@xxxxxxxxxx> wrote:
> On gcc 4.4.4:
>
> mm.c: In function ‘create_grant_pv_mapping’:
> mm.c:3839: error: ‘ol1e.l1’ 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.
Ah yes, that's a common issue with older gcc.
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -3836,7 +3836,8 @@ 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, *pl1e;
> + l1_pgentry_t ol1e = {0}; /* older compilers may reqiure initialization */
Just { } please, and I don't see a need for the comment. Easily
adjustable while committing, of course. And with that
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |