[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] xen/xsm: Make p->policyvers be a local variable (ver) to shut up GCC 5.1.1 warnings.
On 16/09/15 15:57, Konrad Rzeszutek Wilk wrote: policydb.c: In function âuser_readâ: policydb.c:1443:26: error: âbuf[2]â may be used uninitialized in this function [-Werror=maybe-uninitialized] usrdatum->bounds = le32_to_cpu(buf[2]); ^ cc1: all warnings being treated as errors Which (as Andrew mentioned) is because GCC cannot assume that 'p->policyvers' has the same value between checks. We make it local, optimize the name to 'ver' and the warnings go away. We also update another call site with this modification to make it more inline with the rest of the functions. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |