* [Qemu-devel] [PATCH] vl: fix build when configured with no graphic support
@ 2013-10-29 4:36 Antony Pavlov
2013-10-29 5:19 ` Stefan Weil
2013-11-01 10:29 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
0 siblings, 2 replies; 6+ messages in thread
From: Antony Pavlov @ 2013-10-29 4:36 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-trivial, qemu-devel, Antony Pavlov
The following error occurs when building no graphic output support:
vl.c: In function ‘main’:
vl.c:2829:19: error: variable ‘ds’ set but not used [-Werror=unused-but-set-variable]
DisplayState *ds;
^
cc1: all warnings being treated as errors
To reproduce this issue, just run:
$ ./configure \
--disable-curses \
--disable-sdl \
--disable-cocoa \
--disable-gtk \
--disable-vnc \
--enable-werror
$ make vl.o
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
vl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vl.c b/vl.c
index b42ac67..8fbf25e 100644
--- a/vl.c
+++ b/vl.c
@@ -4269,6 +4269,7 @@ int main(int argc, char **argv, char **envp)
/* init local displays */
switch (display_type) {
case DT_NOGRAPHIC:
+ (void)ds;
break;
#if defined(CONFIG_CURSES)
case DT_CURSES:
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] vl: fix build when configured with no graphic support
2013-10-29 4:36 [Qemu-devel] [PATCH] vl: fix build when configured with no graphic support Antony Pavlov
@ 2013-10-29 5:19 ` Stefan Weil
2013-11-01 10:29 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
1 sibling, 0 replies; 6+ messages in thread
From: Stefan Weil @ 2013-10-29 5:19 UTC (permalink / raw)
To: Antony Pavlov, Anthony Liguori; +Cc: qemu-trivial, qemu-devel
Am 29.10.2013 05:36, schrieb Antony Pavlov:
> The following error occurs when building no graphic output support:
>
> vl.c: In function ‘main’:
> vl.c:2829:19: error: variable ‘ds’ set but not used [-Werror=unused-but-set-variable]
> DisplayState *ds;
> ^
> cc1: all warnings being treated as errors
>
> To reproduce this issue, just run:
>
> $ ./configure \
> --disable-curses \
> --disable-sdl \
> --disable-cocoa \
> --disable-gtk \
> --disable-vnc \
> --enable-werror
> $ make vl.o
>
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> vl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/vl.c b/vl.c
> index b42ac67..8fbf25e 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4269,6 +4269,7 @@ int main(int argc, char **argv, char **envp)
> /* init local displays */
> switch (display_type) {
> case DT_NOGRAPHIC:
> + (void)ds;
> break;
> #if defined(CONFIG_CURSES)
> case DT_CURSES:
Reviewed-by: Stefan Weil <sw@weilnetz.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] vl: fix build when configured with no graphic support
2013-10-29 4:36 [Qemu-devel] [PATCH] vl: fix build when configured with no graphic support Antony Pavlov
2013-10-29 5:19 ` Stefan Weil
@ 2013-11-01 10:29 ` Michael Tokarev
2013-11-01 11:14 ` Antony Pavlov
1 sibling, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2013-11-01 10:29 UTC (permalink / raw)
To: Antony Pavlov; +Cc: qemu-trivial, qemu-devel, Anthony Liguori
29.10.2013 08:36, Antony Pavlov wrote
> The following error occurs when building no graphic output support:
>
> vl.c: In function ‘main’:
> vl.c:2829:19: error: variable ‘ds’ set but not used [-Werror=unused-but-set-variable]
> DisplayState *ds;
> ^
> cc1: all warnings being treated as errors
Thanks, applied to the trivial-patches queue.
While at it, I also added a comment to the line being added,
telling what this is all about:
--- a/vl.c
+++ b/vl.c
@@ -4269,6 +4269,7 @@ int main(int argc, char **argv, char **envp)
/* init local displays */
switch (display_type) {
case DT_NOGRAPHIC:
+ (void)ds; /* avoid warning if no display is configured */
break;
#if defined(CONFIG_CURSES)
case DT_CURSES:
Hopefully it is okay... ;)
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] vl: fix build when configured with no graphic support
2013-11-01 10:29 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
@ 2013-11-01 11:14 ` Antony Pavlov
2013-11-01 11:18 ` Michael Tokarev
0 siblings, 1 reply; 6+ messages in thread
From: Antony Pavlov @ 2013-11-01 11:14 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-trivial, qemu-devel, Anthony Liguori
On Fri, 01 Nov 2013 14:29:24 +0400
Michael Tokarev <mjt@tls.msk.ru> wrote:
> 29.10.2013 08:36, Antony Pavlov wrote
> > The following error occurs when building no graphic output support:
^^^^^
Can you plese fix misprint in my git commit message too.
I meant "when building with no graphic output support".
> >
> > vl.c: In function ‘main’:
> > vl.c:2829:19: error: variable ‘ds’ set but not used [-Werror=unused-but-set-variable]
> > DisplayState *ds;
> > ^
> > cc1: all warnings being treated as errors
>
> Thanks, applied to the trivial-patches queue.
>
> While at it, I also added a comment to the line being added,
> telling what this is all about:
>
> --- a/vl.c
> +++ b/vl.c
> @@ -4269,6 +4269,7 @@ int main(int argc, char **argv, char **envp)
> /* init local displays */
> switch (display_type) {
> case DT_NOGRAPHIC:
> + (void)ds; /* avoid warning if no display is configured */
> break;
> #if defined(CONFIG_CURSES)
> case DT_CURSES:
>
> Hopefully it is okay... ;)
>
> /mjt
--
--
Best regards,
Antony Pavlov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] vl: fix build when configured with no graphic support
2013-11-01 11:14 ` Antony Pavlov
@ 2013-11-01 11:18 ` Michael Tokarev
2013-11-01 12:54 ` Antony Pavlov
0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2013-11-01 11:18 UTC (permalink / raw)
To: Antony Pavlov; +Cc: qemu-trivial, qemu-devel, Anthony Liguori
01.11.2013 15:14, Antony Pavlov wrote:
> On Fri, 01 Nov 2013 14:29:24 +0400
> Michael Tokarev <mjt@tls.msk.ru> wrote:
>
>> 29.10.2013 08:36, Antony Pavlov wrote
>>> The following error occurs when building no graphic output support:
> ^^^^^
> Can you plese fix misprint in my git commit message too.
Fixed. Thank you for pointing this out.
>> + (void)ds; /* avoid warning if no display is configured */
Are you okay with me adding the comment? :)
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] vl: fix build when configured with no graphic support
2013-11-01 11:18 ` Michael Tokarev
@ 2013-11-01 12:54 ` Antony Pavlov
0 siblings, 0 replies; 6+ messages in thread
From: Antony Pavlov @ 2013-11-01 12:54 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-trivial, qemu-devel, Anthony Liguori
On Fri, 01 Nov 2013 15:18:28 +0400
Michael Tokarev <mjt@tls.msk.ru> wrote:
> 01.11.2013 15:14, Antony Pavlov wrote:
> > On Fri, 01 Nov 2013 14:29:24 +0400
> > Michael Tokarev <mjt@tls.msk.ru> wrote:
> >
> >> 29.10.2013 08:36, Antony Pavlov wrote
> >>> The following error occurs when building no graphic output support:
> > ^^^^^
> > Can you plese fix misprint in my git commit message too.
>
> Fixed. Thank you for pointing this out.
>
> >> + (void)ds; /* avoid warning if no display is configured */
>
> Are you okay with me adding the comment? :)
IMHO your comment is useful, thanks!
--
Best regards,
Antony Pavlov
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-01 12:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 4:36 [Qemu-devel] [PATCH] vl: fix build when configured with no graphic support Antony Pavlov
2013-10-29 5:19 ` Stefan Weil
2013-11-01 10:29 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2013-11-01 11:14 ` Antony Pavlov
2013-11-01 11:18 ` Michael Tokarev
2013-11-01 12:54 ` Antony Pavlov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).