[libvirt] [PATCH] Mark in_open parameter of remoteAuthenticate as unused when it's unused

Otherwise compiling with -Werror will fail. --- I just pushed this trivial patch. src/remote/remote_driver.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index e3df27b..c2b58e6 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -6475,7 +6475,11 @@ done: /*----------------------------------------------------------------------*/ static int -remoteAuthenticate (virConnectPtr conn, struct private_data *priv, int in_open, +remoteAuthenticate (virConnectPtr conn, struct private_data *priv, int in_open +#if !HAVE_SASL && !HAVE_POLKIT + ATTRIBUTE_UNUSED +#endif + , virConnectAuthPtr auth #if !HAVE_SASL && !HAVE_POLKIT ATTRIBUTE_UNUSED -- 1.6.3.3

On 04/20/2010 12:56 PM, Matthias Bolte wrote:
Otherwise compiling with -Werror will fail. ---
static int -remoteAuthenticate (virConnectPtr conn, struct private_data *priv, int in_open, +remoteAuthenticate (virConnectPtr conn, struct private_data *priv, int in_open +#if !HAVE_SASL && !HAVE_POLKIT + ATTRIBUTE_UNUSED +#endif + , virConnectAuthPtr auth #if !HAVE_SASL && !HAVE_POLKIT ATTRIBUTE_UNUSED
I'd rather use mine instead as it occupies fewer lines and fewer #ifdefs. Paolo Bonzini confirmed off-list that gcc treats ATTRIBUTE_UNUSED as _maybe_ unused, not _must be_ unused. https://www.redhat.com/archives/libvir-list/2010-April/msg00836.html So I rebased mine on top of yours and pushed it. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

2010/4/20 Eric Blake <eblake@redhat.com>:
On 04/20/2010 12:56 PM, Matthias Bolte wrote:
Otherwise compiling with -Werror will fail. ---
static int -remoteAuthenticate (virConnectPtr conn, struct private_data *priv, int in_open, +remoteAuthenticate (virConnectPtr conn, struct private_data *priv, int in_open +#if !HAVE_SASL && !HAVE_POLKIT + ATTRIBUTE_UNUSED +#endif + , virConnectAuthPtr auth #if !HAVE_SASL && !HAVE_POLKIT ATTRIBUTE_UNUSED
I'd rather use mine instead as it occupies fewer lines and fewer #ifdefs. Paolo Bonzini confirmed off-list that gcc treats ATTRIBUTE_UNUSED as _maybe_ unused, not _must be_ unused. https://www.redhat.com/archives/libvir-list/2010-April/msg00836.html
So I rebased mine on top of yours and pushed it.
Ah, okay. Yes that's more compact and better readable. Matthias
participants (2)
-
Eric Blake
-
Matthias Bolte