qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] oslib-posix: Fix compiler warning


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] oslib-posix: Fix compiler warning
Date: Tue, 10 Oct 2017 07:43:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 10/09/2017 10:39 PM, Stefan Weil wrote:
> Am 09.10.2017 um 23:58 schrieb Richard Henderson:
>> On 10/07/2017 08:55 AM, Stefan Weil wrote:
>>> +        char *addr = memset_args->addr;
>>> +        uint64_t numpages = memset_args->numpages;
>>> +        uint64_t hpagesize = memset_args->hpagesize;
>>> +        unsigned i;
>>
>> Match numpages properly while you're at it?
>>
>>
>> r~
> 
> Do you mean using uint64_t for the loop variable i?

Yes.

> Sure. I only hesitated to do that because it is so huge.
> A 64 bit loop variable looks strange, and the loop would
> take some time if it really uses that range. :-)

Why would we use a 64-bit variable for numpages if we don't expect such a
value?  What I see, from spot review only, is an apparent bug -- the iterator
type does not match the bound type.


r~



reply via email to

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