From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfT1n-0001cm-Lo for qemu-devel@nongnu.org; Fri, 25 Sep 2015 09:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfT1i-0006P8-3V for qemu-devel@nongnu.org; Fri, 25 Sep 2015 09:27:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:43200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfT1h-0006Op-Uf for qemu-devel@nongnu.org; Fri, 25 Sep 2015 09:27:02 -0400 References: <1443184788-18859-1-git-send-email-afaerber@suse.de> <1443184788-18859-7-git-send-email-afaerber@suse.de> <56054133.3080108@redhat.com> <56054198.1000400@suse.de> <56054496.6060603@redhat.com> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Message-ID: <56054BA4.7040200@suse.de> Date: Fri, 25 Sep 2015 15:27:00 +0200 MIME-Version: 1.0 In-Reply-To: <56054496.6060603@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 6/7] cutils: Normalize qemu_strto[u]ll() signature List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: Markus Armbruster , Bruce Rogers , Michael Roth , Lin Ma Am 25.09.2015 um 14:56 schrieb Paolo Bonzini: > On 25/09/2015 14:44, Andreas F=C3=A4rber wrote: >>> Do we actually use long long and unsigned long long anywhere? >> >> The next patch does, because checkpatch asks for it. :) >> >> qemu_strtoull() has some special handling for Windows apparently. >=20 > No, I really mean the types. :) The qemu_strtoll/qemu_strtoull function= s > 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 =3D 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. 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. :) Cheers, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N= =C3=BCrnberg)