qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26


From: Eric Blake
Subject: Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26
Date: Thu, 20 Jul 2017 07:10:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 07/20/2017 05:50 AM, Daniel P. Berrange wrote:
> On Fri, Apr 07, 2017 at 03:38:47PM +0100, Dr. David Alan Gilbert wrote:
>> Hi,
>>    Fedora 26 has gcc 7.0.1 which has the normal compliment
>> of new fussy warnings; so far I've posted :
>>

>> +++ b/include/qemu/iov.h
>> @@ -46,7 +46,7 @@ static inline size_t
>>  iov_from_buf(const struct iovec *iov, unsigned int iov_cnt,
>>               size_t offset, const void *buf, size_t bytes)
>>  {
>> -    if (__builtin_constant_p(bytes) && iov_cnt &&
>> +    if (__builtin_constant_p(bytes) && iov_cnt && bytes <= INT_MAX &&
>>          offset <= iov[0].iov_len && bytes <= iov[0].iov_len - offset) {
>>          memcpy(iov[0].iov_base + offset, buf, bytes);
>>          return bytes;

> Unless I've missed a patch somwhere, I think the problems that these two
> chunks are fixing are still needed for current git master, to stop warnings
> in the unit tests.

Huh. I guess I'm not seeing warnings (aka -Werror failures) in those
spots there because I typically compile with -g instead of -O2 for
development.  (It's annoying that the set of warnings issued by gcc
depends on your optimization levels, but such is life)

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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