From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlNQy-00010s-V7 for qemu-devel@nongnu.org; Wed, 09 Sep 2009 09:42:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlNQu-0000yy-6k for qemu-devel@nongnu.org; Wed, 09 Sep 2009 09:42:04 -0400 Received: from [199.232.76.173] (port=58517 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlNQt-0000yl-Pm for qemu-devel@nongnu.org; Wed, 09 Sep 2009 09:41:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1025) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlNQt-0005dH-1p for qemu-devel@nongnu.org; Wed, 09 Sep 2009 09:41:59 -0400 Date: Wed, 9 Sep 2009 10:41:46 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH] Fix and improve qint_from_int64_test Message-ID: <20090909104146.4756309f@doriath> In-Reply-To: <1252403617-30464-1-git-send-email-Pierre.Riteau@irisa.fr> References: <1252403617-30464-1-git-send-email-Pierre.Riteau@irisa.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pierre Riteau Cc: qemu-devel@nongnu.org On Tue, 8 Sep 2009 11:53:37 +0200 Pierre Riteau wrote: > Use a long long integer constant to fix a compilation error (integer > constant is too large for 'long' type). >=20 > Use a better value for testing, as -1 makes the test pass even if > qi->value is of type uint32_t, float or double. This was suggested by > Reimar D=C3=B6ffinger . >=20 > Also, make the test fail when qi->value is of type double or float by > casting qi->value to int64_t, to avoid value being promoted to the type > of qi->value. >=20 > Signed-off-by: Pierre Riteau Seems good to me. Acked-by: Luiz Capitulino