[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] oslib-posix: Fix compiler warning
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH] oslib-posix: Fix compiler warning |
Date: |
Tue, 10 Oct 2017 07:39:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
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?
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. :-)
Feel free to change that if you apply the patch.
Or did you think of using size_t for numpages?
The current code uses both size_t and uint64_t
which could be cleaned as well, maybe even replacing
both by uint32_t (or do we expect more pages?).
Stefan