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

[Xen-devel] [PATCH] fix uninitialized variable error in do_poll()



Now that CONFIG_HVM can (and should) be turned off for the shim, gcc 8.2
apparently is no longer sure that "port" is indeed initialized at

    if ( sched_poll->nr_ports == 1 )
        v->poll_evtchn = port;

It doesn't look to be impossible for the compiler to prove it is not,
but we also can't rely on that to be the case. Add an initializer.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1014,7 +1014,7 @@ static long do_poll(struct sched_poll *s
 {
     struct vcpu   *v = current;
     struct domain *d = v->domain;
-    evtchn_port_t  port;
+    evtchn_port_t  port = 0;
     long           rc;
     unsigned int   i;
 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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