From patchwork Tue Nov 5 16:42:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 288581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9891A2C0095 for ; Wed, 6 Nov 2013 03:43:49 +1100 (EST) Received: from localhost ([::1]:57200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdjjH-00087J-Bd for incoming@patchwork.ozlabs.org; Tue, 05 Nov 2013 11:43:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdjiZ-0007vF-5g for qemu-devel@nongnu.org; Tue, 05 Nov 2013 11:43:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdjiS-00088W-T1 for qemu-devel@nongnu.org; Tue, 05 Nov 2013 11:43:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdjiS-00088O-JR for qemu-devel@nongnu.org; Tue, 05 Nov 2013 11:42:56 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA5GgsgK017429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Nov 2013 11:42:55 -0500 Received: from localhost (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rA5Ggreg014831; Tue, 5 Nov 2013 11:42:54 -0500 From: Stefan Hajnoczi To: Date: Tue, 5 Nov 2013 17:42:48 +0100 Message-Id: <1383669768-23926-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: alex.bennee@linaro.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH] tests: fix 64-bit int literals for 32-bit hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 32-bit hosts: CC tests/test-opts-visitor.o tests/test-opts-visitor.c: In function 'test_value': tests/test-opts-visitor.c:128: warning: integer constant is too large for 'long' type CC tests/test-bitops.o tests/test-bitops.c:34: warning: integer constant is too large for 'long' type tests/test-bitops.c:35: warning: integer constant is too large for 'long' type tests/test-bitops.c:35: warning: integer constant is too large for 'long' type CC tests/endianness-test.o tests/endianness-test.c:47: warning: integer constant is too large for 'long' type Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- tests/endianness-test.c | 3 ++- tests/test-bitops.c | 4 ++-- tests/test-opts-visitor.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/endianness-test.c b/tests/endianness-test.c index feb32a8..8719c09 100644 --- a/tests/endianness-test.c +++ b/tests/endianness-test.c @@ -44,7 +44,8 @@ static const TestCase test_cases[] = { { "ppc", "prep", 0x80000000, .bswap = true }, { "ppc", "bamboo", 0xe8000000, .bswap = true, .superio = "i82378" }, { "ppc64", "mac99", 0xf2000000, .bswap = true, .superio = "i82378" }, - { "ppc64", "pseries", 0x10080000000, .bswap = true, .superio = "i82378" }, + { "ppc64", "pseries", 0x10080000000ULL, + .bswap = true, .superio = "i82378" }, { "sh4", "r2d", 0xfe240000, .superio = "i82378" }, { "sh4eb", "r2d", 0xfe240000, .bswap = true, .superio = "i82378" }, { "sparc64", "sun4u", 0x1fe02000000LL, .bswap = true }, diff --git a/tests/test-bitops.c b/tests/test-bitops.c index 4e713e4..8238eb5 100644 --- a/tests/test-bitops.c +++ b/tests/test-bitops.c @@ -31,8 +31,8 @@ static const S32Test test_s32_data[] = { }; static const S64Test test_s64_data[] = { - { 0x8459826734967223, 60, 4, -8 }, - { 0x8459826734967223, 0, 64, 0x8459826734967223 }, + { 0x8459826734967223ULL, 60, 4, -8 }, + { 0x8459826734967223ULL, 0, 64, 0x8459826734967223LL }, }; static void test_sextract32(void) diff --git a/tests/test-opts-visitor.c b/tests/test-opts-visitor.c index 9f902b5..ebeee5d 100644 --- a/tests/test-opts-visitor.c +++ b/tests/test-opts-visitor.c @@ -125,7 +125,7 @@ test_value(OptsVisitorFixture *f, gconstpointer test_data) g_assert((magic & bitval) == 0); magic |= bitval; } - g_assert(magic == 0xBADC0FFEE0DDF00D); + g_assert(magic == 0xBADC0FFEE0DDF00DULL); magic = 0; for (u16 = f->userdef->u16; u16 != NULL; u16 = u16->next) {