From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Markus Armbruster <armbru@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Thomas Huth <thuth@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: Wshadow: Better name for 'optarg'?
Date: Wed, 4 Oct 2023 11:15:54 +0100 [thread overview]
Message-ID: <ZR07WvspRlftPpMV@redhat.com> (raw)
In-Reply-To: <14cd0201-1507-bfa8-fe9e-f482c35d21ca@linaro.org>
On Wed, Oct 04, 2023 at 12:05:04PM +0200, Philippe Mathieu-Daudé wrote:
> Hi,
>
> I'm getting a bunch of errors for 'optarg' declared in <unistd.h>:
>
> NAME
> getopt – get option character from command line argument list
>
> LIBRARY
> Standard C Library (libc, -lc)
>
> SYNOPSIS
> #include <unistd.h>
>
> extern char *optarg;
>
>
> qom/object_interfaces.c:262:53: error: declaration shadows a variable in the
> global scope [-Werror,-Wshadow]
> ObjectOptions *user_creatable_parse_str(const char *optarg, Error **errp)
snip
> Do we want to clean those? Any good name suggestion?
Yes. any of "argval", "opts", "optstr", "optval".
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2023-10-04 10:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 10:05 Wshadow: Better name for 'optarg'? Philippe Mathieu-Daudé
2023-10-04 10:15 ` Daniel P. Berrangé [this message]
2023-10-04 13:14 ` Warner Losh
2023-10-04 17:23 ` Richard Henderson
2023-10-04 17:35 ` Thomas Huth
2023-10-04 17:43 ` Philippe Mathieu-Daudé
2023-10-04 17:47 ` Warner Losh
2023-10-04 17:56 ` Thomas Huth
2023-10-04 18:02 ` Daniel P. Berrangé
2023-10-05 6:56 ` Philippe Mathieu-Daudé
2023-10-05 5:17 ` Markus Armbruster
2023-10-05 6:52 ` Philippe Mathieu-Daudé
2023-10-05 8:44 ` Daniel P. Berrangé
2023-10-05 8:50 ` Claudio Fontana
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=ZR07WvspRlftPpMV@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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.