qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringo


From: Philippe Mathieu-Daudé
Subject: Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
Date: Thu, 22 Apr 2021 17:43:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 4/22/21 5:38 PM, Thomas Huth wrote:
> On 22/04/2021 16.31, Philippe Mathieu-Daudé wrote:
>> On 4/22/21 2:41 PM, Christian Borntraeger wrote:
>>> On 22.04.21 13:47, Thomas Huth wrote:
>>>> On 22/04/2021 13.24, Philippe Mathieu-Daudé wrote:
>>>>> On 4/22/21 12:30 PM, Peter Maydell wrote:
>>>>>> On Thu, 22 Apr 2021 at 11:18, Daniel P. Berrangé
>>>>>> <berrange@redhat.com> wrote:

>> We are good with:
>>
>> -- >8 --
>> diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
>> index 29fd9019b8..dcec09b6f9 100644
>> --- a/pc-bios/s390-ccw/Makefile
>> +++ b/pc-bios/s390-ccw/Makefile
>> @@ -8,6 +8,9 @@ CFLAGS = -O2 -g
>>   quiet-command = $(if $(V),$1,$(if $(2),@printf "  %-7s %s\n" $2 $3 &&
>> $1, @$1))
>>   cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null >
>> /dev/null \
>>                2>&1 && echo OK), $1, $2)
>> +cc-c-option = $(if $(shell $(CC) $1 $2 -c -o /dev/null -xc /dev/null \
>> +                >/dev/null 2>&1 && echo OK), $2, $3)
>>
>>   VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.sh %.rc Kconfig% %.json.in
>>   set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath
>> $(PATTERN) $1)))
>> @@ -30,6 +33,7 @@ OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o
>> menu.o \
>>            virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o
>>
>>   QEMU_CFLAGS := -Wall $(filter -W%, $(QEMU_CFLAGS))
>> +QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS),
>> -Wno-stringop-overflow)
>>   QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks
> 
> I think you don't need the "cc-c-option" magic here. Just add the
> -Wno-stringop-overflow. All supported versions of GCC and Clang simply
> silently ignore unknown -Wno-something options (try e.g. "gcc
> -Wno-yadayadayada" on the command line).

Indeed, TIL :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]