* [Qemu-devel] [PATCH] r2d: fix build on mingw
@ 2019-02-01 23:00 Michael S. Tsirkin
2019-02-01 23:07 ` Philippe Mathieu-Daudé
2019-02-03 17:00 ` no-reply
0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2019-02-01 23:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Magnus Damm, Aurelien Jarno
Comment near strncpy explains kernel_cmdline does
not need to be 0-terminated.
Accordingly mark it as QEMU_NONSTRING.
Without this, gcc warns:
'strncpy' specified bound 256 equals destination size
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/sh4/r2d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 5b399e7161..dcdb3728cb 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -220,7 +220,7 @@ static struct QEMU_PACKED
char pad[232];
- char kernel_cmdline[256];
+ char kernel_cmdline[256] QEMU_NONSTRING;
} boot_params;
static void r2d_init(MachineState *machine)
--
MST
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] r2d: fix build on mingw
2019-02-01 23:00 [Qemu-devel] [PATCH] r2d: fix build on mingw Michael S. Tsirkin
@ 2019-02-01 23:07 ` Philippe Mathieu-Daudé
2019-02-03 17:00 ` no-reply
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-01 23:07 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel; +Cc: Magnus Damm, Aurelien Jarno
On 2/2/19 12:00 AM, Michael S. Tsirkin wrote:
> Comment near strncpy explains kernel_cmdline does
> not need to be 0-terminated.
>
> Accordingly mark it as QEMU_NONSTRING.
>
> Without this, gcc warns:
> 'strncpy' specified bound 256 equals destination size
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/sh4/r2d.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
> index 5b399e7161..dcdb3728cb 100644
> --- a/hw/sh4/r2d.c
> +++ b/hw/sh4/r2d.c
> @@ -220,7 +220,7 @@ static struct QEMU_PACKED
>
> char pad[232];
>
> - char kernel_cmdline[256];
> + char kernel_cmdline[256] QEMU_NONSTRING;
> } boot_params;
>
> static void r2d_init(MachineState *machine)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] r2d: fix build on mingw
2019-02-01 23:00 [Qemu-devel] [PATCH] r2d: fix build on mingw Michael S. Tsirkin
2019-02-01 23:07 ` Philippe Mathieu-Daudé
@ 2019-02-03 17:00 ` no-reply
1 sibling, 0 replies; 3+ messages in thread
From: no-reply @ 2019-02-03 17:00 UTC (permalink / raw)
To: mst; +Cc: fam, qemu-devel, magnus.damm, aurelien
Patchew URL: https://patchew.org/QEMU/20190201230042.31003-1-mst@redhat.com/
Hi,
This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14
=== TEST SCRIPT END ===
Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=2.0
ERROR: unknown option --with-sdlabi=2.0
Try '/tmp/qemu-test/src/configure --help' for more information
# QEMU configure log Sun Feb 3 17:00:37 UTC 2019
# Configured with: '/tmp/qemu-test/src/configure' '--enable-werror' '--target-list=x86_64-softmmu,aarch64-softmmu' '--prefix=/tmp/qemu-test/install' '--python=/usr/bin/python3' '--cross-prefix=x86_64-w64-mingw32-' '--enable-trace-backends=simple' '--enable-gnutls' '--enable-nettle' '--enable-curl' '--enable-vnc' '--enable-bzip2' '--enable-guest-agent' '--with-sdlabi=2.0'
---
funcs: do_compiler do_cc compile_object check_define main
lines: 92 122 617 634 0
x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __linux__ not defined
#error __linux__ not defined
^~~~~
---
funcs: do_compiler do_cc compile_object check_define main
lines: 92 122 617 686 0
x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __i386__ not defined
#error __i386__ not defined
^~~~~
---
funcs: do_compiler do_cc compile_object check_define main
lines: 92 122 617 689 0
x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __ILP32__ not defined
#error __ILP32__ not defined
^~~~~
---
lines: 92 128 920 0
x86_64-w64-mingw32-gcc -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -g -liberty
/usr/lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -liberty
collect2: error: ld returned 1 exit status
Failed to run 'configure'
Traceback (most recent call last):
File "./tests/docker/docker.py", line 563, in <module>
The full log is available at
http://patchew.org/logs/20190201230042.31003-1-mst@redhat.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-03 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-01 23:00 [Qemu-devel] [PATCH] r2d: fix build on mingw Michael S. Tsirkin
2019-02-01 23:07 ` Philippe Mathieu-Daudé
2019-02-03 17:00 ` no-reply
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).