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_dm.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_dm.c')
-rw-r--r-- | tools/libxl/libxl_dm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 0c0084f5bb..4064d5d716 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -366,7 +366,7 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, } if (vnc) { int display = 0; - const char *listen = "127.0.0.1"; + const char *addr = "127.0.0.1"; char *vncarg = NULL; flexarray_append(dm_args, "-vnc"); @@ -374,16 +374,16 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, if (vnc->display) { display = vnc->display; if (vnc->listen && strchr(vnc->listen, ':') == NULL) { - listen = vnc->listen; + addr = vnc->listen; } } else if (vnc->listen) { - listen = vnc->listen; + addr = vnc->listen; } - if (strchr(listen, ':') != NULL) - vncarg = libxl__sprintf(gc, "%s", listen); + if (strchr(addr, ':') != NULL) + vncarg = libxl__sprintf(gc, "%s", addr); else - vncarg = libxl__sprintf(gc, "%s:%d", listen, display); + vncarg = libxl__sprintf(gc, "%s:%d", addr, display); if (vnc->passwd && vnc->passwd[0]) { vncarg = libxl__sprintf(gc, "%s,password", vncarg); } |