qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signatu


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature
Date: Fri, 25 Sep 2015 15:47:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0


On 25/09/2015 15:27, Andreas Färber wrote:
>> > 
>> > No, I really mean the types. :) The qemu_strtoll/qemu_strtoull functions
>> > use {,u}int64_t because they are much more used than long long and
>> > unsigned long long.
> Well, my answer still stands: The next patch has code using long long.
> 
> Problem is that uint64_t foo = strtoull(...) works, while
> qemu_strtoull(..., &foo) causes a pointer mismatch warning treated as
> error. I could've converted those to uint64_t (assuming the type is not
> needed for something else), but I rather wanted to keep changes small.
> 
> If we want functions using [u]int64_t, we should name them
> ...strto[u]64, not mixing C and POSIX types.

Good point.  Yes, I would prefer the function to be renamed and using
uint64_t in string-input-visitor.

Paolo

> But I assumed there may be some controversy, so I intentionally put this
> after the actual bug fixes and test cases, they can easily be dropped. :)



reply via email to

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