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 <[email protected]> Cc: Liming Gao <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <[email protected]> --- 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 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

