aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_pci.c
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2012-09-17 11:17:00 +0100
committerIan Campbell <Ian.Campbell@citrix.com>2012-09-17 11:17:00 +0100
commit4de237a42e0b79c87aeaf37792be6458b5437f7b (patch)
tree0f1b0d38881aee575bdcd3ee65a0ebe500db5f81 /tools/libxl/libxl_pci.c
parent5e61076e8f6e48856dacbd65499d6cb69d31976b (diff)
downloadxen-4de237a42e0b79c87aeaf37792be6458b5437f7b.tar.gz
xen-4de237a42e0b79c87aeaf37792be6458b5437f7b.tar.bz2
xen-4de237a42e0b79c87aeaf37792be6458b5437f7b.zip
libxl: Enable -Wshadow.
It was convenient to invent $(CFLAGS_LIBXL) to do this. Various renamings to avoid shadowing standard functions: - index(3) - listen(2) - link(2) - abort(3) - abs(3) Reduced the scope of some variables to avoid conflicts. Change to libxc is due to the nested hypercall buf macros in set_xen_guest_handle (used in libxl) using the same local private vars. Build tested only. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_pci.c')
-rw-r--r--tools/libxl/libxl_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 48986f3fa8..ff447e7102 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -167,7 +167,6 @@ static int libxl__device_pci_remove_xenstore(libxl__gc *gc, uint32_t domid, libx
char *be_path, *num_devs_path, *num_devs, *xsdev, *tmp, *tmppath;
int num, i, j;
xs_transaction_t t;
- unsigned int domain = 0, bus = 0, dev = 0, func = 0;
be_path = libxl__sprintf(gc, "%s/backend/pci/%d/0", libxl__xs_get_dompath(gc, 0), domid);
num_devs_path = libxl__sprintf(gc, "%s/num_devs", be_path);
@@ -188,6 +187,7 @@ static int libxl__device_pci_remove_xenstore(libxl__gc *gc, uint32_t domid, libx
}
for (i = 0; i < num; i++) {
+ unsigned int domain = 0, bus = 0, dev = 0, func = 0;
xsdev = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s/dev-%d", be_path, i));
sscanf(xsdev, PCI_BDF, &domain, &bus, &dev, &func);
if (domain == pcidev->domain && bus == pcidev->bus &&