Re: [PATCH] target/i386/hax-posix: fix two 'format-truncation' compile warnings

2020-03-03 Thread Pan Nengyuan
On 3/3/2020 6:47 PM, Paolo Bonzini wrote: > On 24/02/20 07:51, pannengy...@huawei.com wrote: >> diff --git a/target/i386/hax-posix.c b/target/i386/hax-posix.c >> index a5426a6dac..197d5bc0f9 100644 >> --- a/target/i386/hax-posix.c >> +++ b/target/i386/hax-posix.c >> @@ -121,7 +121,8 @@ static ch

Re: [PATCH] target/i386/hax-posix: fix two 'format-truncation' compile warnings

2020-03-03 Thread Paolo Bonzini
On 24/02/20 07:51, pannengy...@huawei.com wrote: > diff --git a/target/i386/hax-posix.c b/target/i386/hax-posix.c > index a5426a6dac..197d5bc0f9 100644 > --- a/target/i386/hax-posix.c > +++ b/target/i386/hax-posix.c > @@ -121,7 +121,8 @@ static char *hax_vm_devfs_string(int vm_id) > return

Re: [PATCH] target/i386/hax-posix: fix two 'format-truncation' compile warnings

2020-03-03 Thread Laurent Vivier
Le 24/02/2020 à 07:51, pannengy...@huawei.com a écrit : > From: Pan Nengyuan > > Fix compile warnings: > /mnt/sdb/qemu-new/qemu_test/qemu/target/i386/hax-posix.c:124:56: error: > ‘%02d’ directive output may be truncated writing between 2 and 11 bytes into > a region of size 3 [-Werror=format-tr

[PATCH] target/i386/hax-posix: fix two 'format-truncation' compile warnings

2020-02-23 Thread pannengyuan
From: Pan Nengyuan Fix compile warnings: /mnt/sdb/qemu-new/qemu_test/qemu/target/i386/hax-posix.c:124:56: error: ‘%02d’ directive output may be truncated writing between 2 and 11 bytes into a region of size 3 [-Werror=format-truncation=] snprintf(name, sizeof HAX_VM_DEVFS, "/dev/hax_vm/vm%