|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Unused Variable in xl code for CPU Pool
On Thu, 2012-01-26 at 13:15 +0000, John McDermott wrote:
> Xen Developers,
>
> FYI, in 4.1-testing, tools/libxl/xl_cmdimpl.c, in function
> main_cpupoollist, the variable opt_long is set but not used. Tools
> won't make with this warning.
Our test system compilers obviously don't generate this particular
warning so it slipped through. Thanks for reporting.
Looks like fallout from 22838:aab67c1c6b87 which removed the (nop)
implementation of that option.
The following just nukes it altogether, the generic handling of
unsupported options already prints something.
Ian.
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1328107525 0
# Node ID 6e1db0380ba3467e26128706a62195bf2816e00e
# Parent 667da384457b0ec5f8f2ea4ec3c1ee43008e7ed5
xl: Drop -l option to xl cpupool-list
The implementation (which was a nop) was removed back in 22838:aab67c1c6b87 but
this now causes "set but not used" warnings from some compilers. Might as well
just nuke the option entirely.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r 667da384457b -r 6e1db0380ba3 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Wed Feb 01 14:45:25 2012 +0000
+++ b/tools/libxl/xl_cmdimpl.c Wed Feb 01 14:45:25 2012 +0000
@@ -5538,11 +5538,9 @@ int main_cpupoollist(int argc, char **ar
int option_index = 0;
static struct option long_options[] = {
{"help", 0, 0, 'h'},
- {"long", 0, 0, 'l'},
{"cpus", 0, 0, 'c'},
{0, 0, 0, 0}
};
- int opt_long = 0;
int opt_cpus = 0;
const char *pool = NULL;
libxl_cpupoolinfo *poolinfo;
@@ -5552,7 +5550,7 @@ int main_cpupoollist(int argc, char **ar
int ret = 0;
while (1) {
- opt = getopt_long(argc, argv, "hlc", long_options, &option_index);
+ opt = getopt_long(argc, argv, "hc", long_options, &option_index);
if (opt == -1)
break;
@@ -5560,9 +5558,6 @@ int main_cpupoollist(int argc, char **ar
case 'h':
help("cpupool-list");
return 0;
- case 'l':
- opt_long = 1;
- break;
case 'c':
opt_cpus = 1;
break;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |