* [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out
@ 2019-06-25 12:39 Christophe de Dinechin
2019-06-25 12:58 ` Dr. David Alan Gilbert
2019-06-26 16:49 ` Stefano Garzarella
0 siblings, 2 replies; 5+ messages in thread
From: Christophe de Dinechin @ 2019-06-25 12:39 UTC (permalink / raw)
To: qemu-devel; +Cc: Dr. David Alan Gilbert
In hmp_change(), the variable hmp_mon is only used
by code under #ifdef CONFIG_VNC. This results in a build
error when VNC is configured out with the default of
treating warnings as errors:
monitor/hmp-cmds.c: In function ‘hmp_change’:
monitor/hmp-cmds.c:1946:17: error: unused variable ‘hmp_mon’ [-Werror=unused-variable]
1946 | MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
| ^~~~~~~
v2: Move variable down as suggested by Philippe Mathieu-Daudé
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
---
monitor/hmp-cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index c283dde0e9..2ae784b9b8 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1943,7 +1943,6 @@ static void hmp_change_read_arg(void *opaque, const char *password,
void hmp_change(Monitor *mon, const QDict *qdict)
{
- MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
const char *device = qdict_get_str(qdict, "device");
const char *target = qdict_get_str(qdict, "target");
const char *arg = qdict_get_try_str(qdict, "arg");
@@ -1961,6 +1960,7 @@ void hmp_change(Monitor *mon, const QDict *qdict)
if (strcmp(target, "passwd") == 0 ||
strcmp(target, "password") == 0) {
if (!arg) {
+ MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
monitor_read_password(hmp_mon, hmp_change_read_arg, NULL);
return;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out
2019-06-25 12:39 [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out Christophe de Dinechin
@ 2019-06-25 12:58 ` Dr. David Alan Gilbert
2019-06-26 16:49 ` Stefano Garzarella
1 sibling, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2019-06-25 12:58 UTC (permalink / raw)
To: Christophe de Dinechin; +Cc: qemu-devel
* Christophe de Dinechin (dinechin@redhat.com) wrote:
> In hmp_change(), the variable hmp_mon is only used
> by code under #ifdef CONFIG_VNC. This results in a build
> error when VNC is configured out with the default of
> treating warnings as errors:
>
> monitor/hmp-cmds.c: In function ‘hmp_change’:
> monitor/hmp-cmds.c:1946:17: error: unused variable ‘hmp_mon’ [-Werror=unused-variable]
> 1946 | MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
> | ^~~~~~~
>
> v2: Move variable down as suggested by Philippe Mathieu-Daudé
>
> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> monitor/hmp-cmds.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
> index c283dde0e9..2ae784b9b8 100644
> --- a/monitor/hmp-cmds.c
> +++ b/monitor/hmp-cmds.c
> @@ -1943,7 +1943,6 @@ static void hmp_change_read_arg(void *opaque, const char *password,
>
> void hmp_change(Monitor *mon, const QDict *qdict)
> {
> - MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
> const char *device = qdict_get_str(qdict, "device");
> const char *target = qdict_get_str(qdict, "target");
> const char *arg = qdict_get_try_str(qdict, "arg");
> @@ -1961,6 +1960,7 @@ void hmp_change(Monitor *mon, const QDict *qdict)
> if (strcmp(target, "passwd") == 0 ||
> strcmp(target, "password") == 0) {
> if (!arg) {
> + MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
> monitor_read_password(hmp_mon, hmp_change_read_arg, NULL);
> return;
> }
> --
> 2.21.0
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out
2019-06-25 12:39 [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out Christophe de Dinechin
2019-06-25 12:58 ` Dr. David Alan Gilbert
@ 2019-06-26 16:49 ` Stefano Garzarella
2019-06-26 17:44 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 5+ messages in thread
From: Stefano Garzarella @ 2019-06-26 16:49 UTC (permalink / raw)
To: Christophe de Dinechin; +Cc: qemu-devel, Dr. David Alan Gilbert
On Tue, Jun 25, 2019 at 02:39:05PM +0200, Christophe de Dinechin wrote:
> In hmp_change(), the variable hmp_mon is only used
> by code under #ifdef CONFIG_VNC. This results in a build
> error when VNC is configured out with the default of
> treating warnings as errors:
>
> monitor/hmp-cmds.c: In function ‘hmp_change’:
> monitor/hmp-cmds.c:1946:17: error: unused variable ‘hmp_mon’ [-Werror=unused-variable]
> 1946 | MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
> | ^~~~~~~
>
> v2: Move variable down as suggested by Philippe Mathieu-Daudé
Should we move out this line from the commit message?
(Maybe Dave can remove it when apply)
>
> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
> ---
> monitor/hmp-cmds.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out
2019-06-26 16:49 ` Stefano Garzarella
@ 2019-06-26 17:44 ` Philippe Mathieu-Daudé
2019-07-15 10:26 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-26 17:44 UTC (permalink / raw)
To: Stefano Garzarella, Christophe de Dinechin
Cc: qemu-devel, Dr. David Alan Gilbert
On 6/26/19 6:49 PM, Stefano Garzarella wrote:
> On Tue, Jun 25, 2019 at 02:39:05PM +0200, Christophe de Dinechin wrote:
>> In hmp_change(), the variable hmp_mon is only used
>> by code under #ifdef CONFIG_VNC. This results in a build
>> error when VNC is configured out with the default of
>> treating warnings as errors:
>>
>> monitor/hmp-cmds.c: In function ‘hmp_change’:
>> monitor/hmp-cmds.c:1946:17: error: unused variable ‘hmp_mon’ [-Werror=unused-variable]
>> 1946 | MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
>> | ^~~~~~~
>>
>> v2: Move variable down as suggested by Philippe Mathieu-Daudé
>
> Should we move out this line from the commit message?
> (Maybe Dave can remove it when apply)
Yes please :) It was meant to go after the '---' separator.
>>
>> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
>> ---
>> monitor/hmp-cmds.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out
2019-06-26 17:44 ` Philippe Mathieu-Daudé
@ 2019-07-15 10:26 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2019-07-15 10:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Christophe de Dinechin, qemu-devel, Stefano Garzarella
* Philippe Mathieu-Daudé (philmd@redhat.com) wrote:
> On 6/26/19 6:49 PM, Stefano Garzarella wrote:
> > On Tue, Jun 25, 2019 at 02:39:05PM +0200, Christophe de Dinechin wrote:
> >> In hmp_change(), the variable hmp_mon is only used
> >> by code under #ifdef CONFIG_VNC. This results in a build
> >> error when VNC is configured out with the default of
> >> treating warnings as errors:
> >>
> >> monitor/hmp-cmds.c: In function ‘hmp_change’:
> >> monitor/hmp-cmds.c:1946:17: error: unused variable ‘hmp_mon’ [-Werror=unused-variable]
> >> 1946 | MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
> >> | ^~~~~~~
> >>
> >> v2: Move variable down as suggested by Philippe Mathieu-Daudé
> >
> > Should we move out this line from the commit message?
> > (Maybe Dave can remove it when apply)
>
> Yes please :) It was meant to go after the '---' separator.
Done.
Queued.
> >>
> >> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
> >> ---
> >> monitor/hmp-cmds.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
> >
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-15 10:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 12:39 [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out Christophe de Dinechin
2019-06-25 12:58 ` Dr. David Alan Gilbert
2019-06-26 16:49 ` Stefano Garzarella
2019-06-26 17:44 ` Philippe Mathieu-Daudé
2019-07-15 10:26 ` Dr. David Alan Gilbert
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.