* Unused Variable in xl code for CPU Pool
@ 2012-01-26 13:15 John McDermott
2012-02-01 14:48 ` Ian Campbell
0 siblings, 1 reply; 6+ messages in thread
From: John McDermott @ 2012-01-26 13:15 UTC (permalink / raw)
To: xen-devel
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.
Sincerely,
John
----
What is the formal meaning of the one-line program
#include "/dev/tty"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unused Variable in xl code for CPU Pool
2012-01-26 13:15 Unused Variable in xl code for CPU Pool John McDermott
@ 2012-02-01 14:48 ` Ian Campbell
2012-02-02 5:37 ` Juergen Gross
0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2012-02-01 14:48 UTC (permalink / raw)
To: John McDermott; +Cc: Andre Przywara, Juergen Gross, xen-devel, Ian Jackson
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@citrix.com>
# 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@citrix.com>
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unused Variable in xl code for CPU Pool
2012-02-01 14:48 ` Ian Campbell
@ 2012-02-02 5:37 ` Juergen Gross
2012-02-07 16:50 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2012-02-02 5:37 UTC (permalink / raw)
To: Ian Campbell; +Cc: John McDermott, Andre Przywara, xen-devel, Ian Jackson
On 02/01/2012 03:48 PM, Ian Campbell wrote:
> 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@citrix.com>
> # 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@citrix.com>
Acked-by: juergen.gross@ts.fujitsu.com
> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
--
Juergen Gross Principal Developer Operating Systems
PDG ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unused Variable in xl code for CPU Pool
2012-02-02 5:37 ` Juergen Gross
@ 2012-02-07 16:50 ` Ian Jackson
2012-02-07 18:48 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2012-02-07 16:50 UTC (permalink / raw)
To: Juergen Gross; +Cc: John McDermott, Andre Przywara, xen-devel, Ian Campbell
Juergen Gross writes ("Re: [Xen-devel] Unused Variable in xl code for CPU Pool"):
> On 02/01/2012 03:48 PM, Ian Campbell wrote:
> > xl: Drop -l option to xl cpupool-list
...
> > Signed-off-by: Ian Campbell<ian.campbell@citrix.com>
>
> Acked-by: juergen.gross@ts.fujitsu.com
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unused Variable in xl code for CPU Pool
2012-02-07 16:50 ` Ian Jackson
@ 2012-02-07 18:48 ` Ian Jackson
2012-02-13 17:58 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2012-02-07 18:48 UTC (permalink / raw)
To: Ian Jackson
Cc: John McDermott, Andre Przywara, Juergen Gross, xen-devel, Ian Campbell
Ian Jackson writes ("Re: [Xen-devel] Unused Variable in xl code for CPU Pool"):
> Juergen Gross writes ("Re: [Xen-devel] Unused Variable in xl code for CPU Pool"):
> > On 02/01/2012 03:48 PM, Ian Campbell wrote:
> > > xl: Drop -l option to xl cpupool-list
> ...
> > > Signed-off-by: Ian Campbell<ian.campbell@citrix.com>
> >
> > Acked-by: juergen.gross@ts.fujitsu.com
>
> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
For the avoidance of doubt, I have applied this to xen-unstable, not
4.1. I don't think it will cause anything to go wrong in -unstable
but as a rule we should let patches sit there for a bit before
backporting them.
Thanks,
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unused Variable in xl code for CPU Pool
2012-02-07 18:48 ` Ian Jackson
@ 2012-02-13 17:58 ` Ian Jackson
0 siblings, 0 replies; 6+ messages in thread
From: Ian Jackson @ 2012-02-13 17:58 UTC (permalink / raw)
To: John McDermott, Andre Przywara, Juergen Gross, xen-devel, Ian Campbell
Ian Jackson writes ("Re: [Xen-devel] Unused Variable in xl code for CPU Pool"):
> Ian Jackson writes ("Re: [Xen-devel] Unused Variable in xl code for CPU Pool"):
> > Juergen Gross writes ("Re: [Xen-devel] Unused Variable in xl code for CPU Pool"):
> > > On 02/01/2012 03:48 PM, Ian Campbell wrote:
> > > > xl: Drop -l option to xl cpupool-list
> > ...
> > > > Signed-off-by: Ian Campbell<ian.campbell@citrix.com>
> > >
> > > Acked-by: juergen.gross@ts.fujitsu.com
> >
> > Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
>
> For the avoidance of doubt, I have applied this to xen-unstable, not
> 4.1. I don't think it will cause anything to go wrong in -unstable
> but as a rule we should let patches sit there for a bit before
> backporting them.
I have now pushed this into 4.1-testing.
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-13 17:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 13:15 Unused Variable in xl code for CPU Pool John McDermott
2012-02-01 14:48 ` Ian Campbell
2012-02-02 5:37 ` Juergen Gross
2012-02-07 16:50 ` Ian Jackson
2012-02-07 18:48 ` Ian Jackson
2012-02-13 17:58 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.