From nobody Fri Dec 19 05:28:39 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1513728052036230.87774233070252; Tue, 19 Dec 2017 16:00:52 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0F506222447A0; Tue, 19 Dec 2017 15:55:43 -0800 (PST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A2DAA221523BF for ; Tue, 19 Dec 2017 15:55:36 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2017 16:00:23 -0800 Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.58]) by FMSMGA003.fm.intel.com with ESMTP; 19 Dec 2017 16:00:23 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,429,1508828400"; d="scan'208";a="13197406" From: "Kinney, Michael D" To: edk2-devel@lists.01.org Date: Tue, 19 Dec 2017 16:00:10 -0800 Message-Id: <20171220000014.9140-7-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.14.2.windows.3 In-Reply-To: <20171220000014.9140-1-michael.d.kinney@intel.com> References: <20171220000014.9140-1-michael.d.kinney@intel.com> Subject: [edk2] [staging/edk2-test Patch 06/10] MsUnitTestPkg/UnitTestLib: Fix GCC build errors X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Fix typecast of parameter passed to LoadUnitTestCache() to address a GCC build failure. Cast pointers passed into UT_ASSERT_EQUAL() to UINTN. Cc: Sean Brogan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney --- MsUnitTestPkg/Library/UnitTestLib/UnitTestLib.c | 2 +- MsUnitTestPkg/Sample/SampleUnitTestApp/SampleUnitTestApp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MsUnitTestPkg/Library/UnitTestLib/UnitTestLib.c b/MsUnitTestPk= g/Library/UnitTestLib/UnitTestLib.c index bc4176d36e..b94e916a87 100644 --- a/MsUnitTestPkg/Library/UnitTestLib/UnitTestLib.c +++ b/MsUnitTestPkg/Library/UnitTestLib/UnitTestLib.c @@ -278,7 +278,7 @@ InitUnitTestFramework ( // If there is a persisted context, load it now. if (DoesCacheExist( NewFramework )) { - Status =3D LoadUnitTestCache( NewFramework, &(UNIT_TEST_SAVE_HEADER*)(= NewFramework->SavedState) ); + Status =3D LoadUnitTestCache( NewFramework, (UNIT_TEST_SAVE_HEADER **)= (&(NewFramework->SavedState))); if (EFI_ERROR( Status )) { // Don't actually report it as an error, but emit a warning. diff --git a/MsUnitTestPkg/Sample/SampleUnitTestApp/SampleUnitTestApp.c b/M= sUnitTestPkg/Sample/SampleUnitTestApp/SampleUnitTestApp.c index 7531d13117..73af67a8e4 100644 --- a/MsUnitTestPkg/Sample/SampleUnitTestApp/SampleUnitTestApp.c +++ b/MsUnitTestPkg/Sample/SampleUnitTestApp/SampleUnitTestApp.c @@ -62,7 +62,7 @@ MakeSureThatPointerIsNull ( IN UNIT_TEST_CONTEXT Context ) { - UT_ASSERT_EQUAL(mSampleGlobalTestPointer, NULL); + UT_ASSERT_EQUAL ((UINTN)mSampleGlobalTestPointer, (UINTN)NULL); return UNIT_TEST_PASSED; } // ListsShouldHaveTheSameDescriptorSize() =20 @@ -131,7 +131,7 @@ GlobalPointerShouldBeChangeable ( ) { mSampleGlobalTestPointer =3D (VOID*)-1; - UT_ASSERT_EQUAL(mSampleGlobalTestPointer, ((VOID*)-1)); + UT_ASSERT_EQUAL ((UINTN)mSampleGlobalTestPointer, (UINTN)((VOID *)-1)); return UNIT_TEST_PASSED; } // GlobalPointerShouldBeChangeable() =20 --=20 2.14.2.windows.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel