From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False 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 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,429,1508828400"; d="scan'208";a="13197406" 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 From: "Kinney, Michael D" To: edk2-devel@lists.01.org Cc: Sean Brogan , Liming Gao , Michael D Kinney 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: [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: , X-List-Received-Date: Tue, 19 Dec 2017 23:55:37 -0000 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/MsUnitTestPkg/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 = LoadUnitTestCache( NewFramework, &(UNIT_TEST_SAVE_HEADER*)(NewFramework->SavedState) ); + Status = 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/MsUnitTestPkg/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() @@ -131,7 +131,7 @@ GlobalPointerShouldBeChangeable ( ) { mSampleGlobalTestPointer = (VOID*)-1; - UT_ASSERT_EQUAL(mSampleGlobalTestPointer, ((VOID*)-1)); + UT_ASSERT_EQUAL ((UINTN)mSampleGlobalTestPointer, (UINTN)((VOID *)-1)); return UNIT_TEST_PASSED; } // GlobalPointerShouldBeChangeable() -- 2.14.2.windows.3