[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] libxc: initialise rc to -1 at the beginning of meminit_hvm
Variable rc is only set either inside a loop or inside some if statements. To avoid confuse gcc with stricter setting we set rc to -1 at the beginning. Reported-by: Doug Goldstein <cardoe@xxxxxxxxxx> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx> --- tools/libxc/xc_dom_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c index e13a4aa..c0c01a0 100644 --- a/tools/libxc/xc_dom_x86.c +++ b/tools/libxc/xc_dom_x86.c @@ -1258,7 +1258,7 @@ static int meminit_hvm(struct xc_dom_image *dom) unsigned long p2m_size; unsigned long target_pages = dom->target_pages; unsigned long cur_pages, cur_pfn; - int rc; + int rc = -1; xen_capabilities_info_t caps; unsigned long stat_normal_pages = 0, stat_2mb_pages = 0, stat_1gb_pages = 0; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |