[PATCH] tools: avoid unused parameter warning when readline is disabled

Daniel P. Berrangé posted 1 patch 3 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200904092705.730565-1-berrange@redhat.com
tools/vsh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tools: avoid unused parameter warning when readline is disabled
Posted by Daniel P. Berrangé 3 years, 7 months ago
The vshReadlineHistoryAdd stub method does not use its parameter.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---

Pushed to fix minimal build used by layered repo CI

 tools/vsh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index ef2a3f62d7..0e8edcd78c 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2971,7 +2971,7 @@ vshReadline(vshControl *ctl G_GNUC_UNUSED,
 }
 
 void
-vshReadlineHistoryAdd(const char *cmd)
+vshReadlineHistoryAdd(const char *cmd G_GNUC_UNUSED)
 {
     /* empty */
 }
-- 
2.26.2

Re: [PATCH] tools: avoid unused parameter warning when readline is disabled
Posted by Ján Tomko 3 years, 7 months ago
On a Friday in 2020, Daniel P. Berrangé wrote:
>The vshReadlineHistoryAdd stub method does not use its parameter.
>
>Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>---
>
>Pushed to fix minimal build used by layered repo CI
>

Which repo?

Jano

> tools/vsh.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/tools/vsh.c b/tools/vsh.c
>index ef2a3f62d7..0e8edcd78c 100644
>--- a/tools/vsh.c
>+++ b/tools/vsh.c
>@@ -2971,7 +2971,7 @@ vshReadline(vshControl *ctl G_GNUC_UNUSED,
> }
>
> void
>-vshReadlineHistoryAdd(const char *cmd)
>+vshReadlineHistoryAdd(const char *cmd G_GNUC_UNUSED)
> {
>     /* empty */
> }
>-- 
>2.26.2
>
Re: [PATCH] tools: avoid unused parameter warning when readline is disabled
Posted by Daniel P. Berrangé 3 years, 7 months ago
On Fri, Sep 04, 2020 at 06:22:58PM +0200, Ján Tomko wrote:
> On a Friday in 2020, Daniel P. Berrangé wrote:
> > The vshReadlineHistoryAdd stub method does not use its parameter.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > 
> > Pushed to fix minimal build used by layered repo CI
> > 
> 
> Which repo?

Essentially all of the libvirt repos :)



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 :|