diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2012-09-17 11:17:00 +0100 |
---|---|---|
committer | Ian Campbell <Ian.Campbell@citrix.com> | 2012-09-17 11:17:00 +0100 |
commit | 4de237a42e0b79c87aeaf37792be6458b5437f7b (patch) | |
tree | 0f1b0d38881aee575bdcd3ee65a0ebe500db5f81 /tools/libxl/libxl_qmp.c | |
parent | 5e61076e8f6e48856dacbd65499d6cb69d31976b (diff) | |
download | xen-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_qmp.c')
-rw-r--r-- | tools/libxl/libxl_qmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index e33b130f00..0c95e6000b 100644 --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -171,7 +171,7 @@ static int qmp_register_vnc_callback(libxl__qmp_handler *qmp, { GC_INIT(qmp->ctx); const libxl__json_object *obj; - const char *listen, *port; + const char *addr, *port; int rc = -1; if (!libxl__json_object_is_map(o)) { @@ -184,17 +184,17 @@ static int qmp_register_vnc_callback(libxl__qmp_handler *qmp, } obj = libxl__json_map_get("host", o, JSON_STRING); - listen = libxl__json_object_get_string(obj); + addr = libxl__json_object_get_string(obj); obj = libxl__json_map_get("service", o, JSON_STRING); port = libxl__json_object_get_string(obj); - if (!listen || !port) { + if (!addr || !port) { LIBXL__LOG(qmp->ctx, LIBXL__LOG_ERROR, "Failed to retreive VNC connect information."); goto out; } - rc = qmp_write_domain_console_item(gc, qmp->domid, "vnc-listen", listen); + rc = qmp_write_domain_console_item(gc, qmp->domid, "vnc-listen", addr); if (!rc) rc = qmp_write_domain_console_item(gc, qmp->domid, "vnc-port", port); |