All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: John McDermott <segfaultreloaded@gmail.com>,
	Andre Przywara <andre.przywara@amd.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: Unused Variable in xl code for CPU Pool
Date: Thu, 02 Feb 2012 06:37:03 +0100	[thread overview]
Message-ID: <4F2A20FF.90607@ts.fujitsu.com> (raw)
In-Reply-To: <1328107728.17444.81.camel@zakaz.uk.xensource.com>

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

  reply	other threads:[~2012-02-02  5:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-02-07 16:50     ` Ian Jackson
2012-02-07 18:48       ` Ian Jackson
2012-02-13 17:58         ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F2A20FF.90607@ts.fujitsu.com \
    --to=juergen.gross@ts.fujitsu.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=andre.przywara@amd.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=segfaultreloaded@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.