Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
On 2015/11/11 10:41, Zeng, Star wrote: On 2015/11/10 23:31, Andrew Fish wrote: On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: On Nov 10, 2015, at 12:06 AM, Gao, Liming wrote: Andrew: The patch is missing. Liming, My sent mail shows these 3 patches attached? 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch I attached again here: cat 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch From 4eb94d539de6ee8e4b8eebc43d67dfdfe68e64bf Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:29:54 -0800 Subject: [PATCH 1/4] MdeModulePkg:PeiCore Fix Xcode -Wempty-body warning The single line for(); construct is followd by code that is indented. This trigers the -Wempty-body warning. Fix indentation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Star Zeng Just committed the code at R19420. Thanks, Star diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 7480b66..dbcd800 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -681,15 +681,15 @@ PeiCheckAndSwitchStack ( && (*StackPointer == INIT_CAR_VALUE); StackPointer ++); -DEBUG ((EFI_D_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); -DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) Private->HobList.Raw))); -DEBUG ((EFI_D_INFO, "Total temporary memory:%d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize)); -DEBUG ((EFI_D_INFO, " temporary memory stack ever used: %d bytes.\n", - (UINT32)(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase)) - )); -DEBUG ((EFI_D_INFO, " temporary memory heap used: %d bytes.\n", - (UINT32)((UINTN)Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw) - )); + DEBUG ((EFI_D_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); + DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) Private->HobList.Raw))); + DEBUG ((EFI_D_INFO, "Total temporary memory:%d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize)); + DEBUG ((EFI_D_INFO, " temporary memory stack ever used: %d bytes.\n", + (UINT32)(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase)) +)); + DEBUG ((EFI_D_INFO, " temporary memory heap used: %d bytes.\n", + (UINT32)((UINTN)Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw) +)); DEBUG_CODE_END (); if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) { ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
On 2015/11/11 10:42, Zeng, Star wrote: On 2015/11/10 23:33, Andrew Fish wrote: On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: On Nov 10, 2015, at 12:06 AM, Gao, Liming mailto:liming@intel.com>> wrote: Andrew: The patch is missing. Liming, My sent mail shows these 3 patches attached? 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch I attached again here: cat 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch From 56cea06ce806fd0ac9295e1211964f30e6baaac1 Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:42:57 -0800 Subject: [PATCH 3/4] MdeModulePkg: Variable add mising VA_COPY Xcode fails to compile: error: array type 'VA_LIST' (aka '__builtin_va_list') is not assignable Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Star Zeng Just committed the code at R19419. Thanks, Star diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 621ce16..8a07f0e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -1716,7 +1716,7 @@ CheckRemainingSpaceForConsistencyInternal ( ASSERT_EFI_ERROR (Status); TotalNeededSize = 0; - Args = Marker; + VA_COPY (Args, Marker); VariableEntry = VA_ARG (Args, VARIABLE_ENTRY_CONSISTENCY *); while (VariableEntry != NULL) { // @@ -1745,7 +1745,7 @@ CheckRemainingSpaceForConsistencyInternal ( return FALSE; } - Args = Marker; + VA_COPY (Args, Marker); VariableEntry = VA_ARG (Args, VARIABLE_ENTRY_CONSISTENCY *); while (VariableEntry != NULL) { // ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
RegularExpressionDxe change is ok for me. Reviewed-by: Feng Tian -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Andrew Fish Sent: Tuesday, November 10, 2015 23:33 To: Gao, Liming Cc: edk2-devel; Tian, Feng Subject: Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues. > On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: > > >> On Nov 10, 2015, at 12:06 AM, Gao, Liming wrote: >> >> Andrew: >> The patch is missing. >> > > Liming, > > My sent mail shows these 3 patches attached? > 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch > 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch > 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch > > I attached again here: > > >cat 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch >From 7f82886d42a82d939760562ab3f992ae6a3a70b7 Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:31:03 -0800 Subject: [PATCH 2/4] MdeModulePkg: RegularExpressionDxe Xcode warnings fixes ErrorMessage generates a Wpointer-sign error, char * vs unsigned char * assigning structures with = generate memcpy link failures. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c | 9 ++--- MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c | 2 +- .../Universal/RegularExpressionDxe/RegularExpressionDxe.c| 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c index 25b768b..7c9771f 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c @@ -70,7 +70,10 @@ static void swap_node(Node* a, Node* b) { Node c; - c = *a; *a = *b; *b = c; + //c = *a; *a = *b; *b = c; + xmemcpy (&c, a, sizeof (Node)); + xmemcpy (a, b, sizeof (Node)); + xmemcpy (b, &c, sizeof (Node)); if (NTYPE(a) == NT_STR) { StrNode* sn = NSTR(a); @@ -4348,7 +4351,7 @@ clear_opt_map_info(OptMapInfo* map) static void copy_opt_map_info(OptMapInfo* to, OptMapInfo* from) { - *to = *from; + xmemcpy(to, from, sizeof(OptMapInfo)); } static void @@ -4463,7 +4466,7 @@ clear_node_opt_info(NodeOptInfo* opt) static void copy_node_opt_info(NodeOptInfo* to, NodeOptInfo* from) { - *to = *from; + xmemcpy(to, from, sizeof (NodeOptInfo)); } static void diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c index 01ac2b3..38fceb4 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c @@ -2211,7 +2211,7 @@ onig_reduce_nested_quantifier(Node* pnode, Node* cnode) switch(ReduceTypeTable[cnum][pnum]) { case RQ_DEL: -*pnode = *cnode; +xmemcpy (pnode, cnode, sizeof (Node)); break; case RQ_A: p->target = c->target; diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c index a3eebf7..453c1eb 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c @@ -120,7 +120,7 @@ OnigurumaMatch ( ); if (OnigResult != ONIG_NORMAL) { -onig_error_code_to_str (ErrorMessage, OnigResult, &ErrorInfo); +onig_error_code_to_str ((OnigUChar *)ErrorMessage, OnigResult, + &ErrorInfo); DEBUG ((DEBUG_ERROR, "Regex compilation failed: %a\n", ErrorMessage)); return EFI_DEVICE_ERROR; } @@ -144,7 +144,7 @@ OnigurumaMatch ( } else { *Result = FALSE; if (OnigResult != ONIG_MISMATCH) { - onig_error_code_to_str (ErrorMessage, OnigResult); + onig_error_code_to_str ((OnigUChar *)ErrorMessage, OnigResult); DEBUG ((DEBUG_ERROR, "Regex match failed: %a\n", ErrorMessage)); } } -- 2.3.2 (Apple Git-55) > > > Thanks, > > Andrew Fish > >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >> Andrew Fish >> Sent: Tuesday, November 10, 2015 3:18 PM >> To: edk2-devel >> Cc: Tian, Feng >> Subject: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues. >> >> Please review the following patches as they are required to build with Xcode >> 6.3.2. >> >> Thanks, >> >> Andrew Fish >> >> >> ___ >> edk2-devel mailing list >> edk2-devel@lists.0
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
On 2015/11/10 23:33, Andrew Fish wrote: On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: On Nov 10, 2015, at 12:06 AM, Gao, Liming mailto:liming@intel.com>> wrote: Andrew: The patch is missing. Liming, My sent mail shows these 3 patches attached? 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch I attached again here: cat 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch From 56cea06ce806fd0ac9295e1211964f30e6baaac1 Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:42:57 -0800 Subject: [PATCH 3/4] MdeModulePkg: Variable add mising VA_COPY Xcode fails to compile: error: array type 'VA_LIST' (aka '__builtin_va_list') is not assignable Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Star Zeng diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 621ce16..8a07f0e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -1716,7 +1716,7 @@ CheckRemainingSpaceForConsistencyInternal ( ASSERT_EFI_ERROR (Status); TotalNeededSize = 0; - Args = Marker; + VA_COPY (Args, Marker); VariableEntry = VA_ARG (Args, VARIABLE_ENTRY_CONSISTENCY *); while (VariableEntry != NULL) { // @@ -1745,7 +1745,7 @@ CheckRemainingSpaceForConsistencyInternal ( return FALSE; } - Args = Marker; + VA_COPY (Args, Marker); VariableEntry = VA_ARG (Args, VARIABLE_ENTRY_CONSISTENCY *); while (VariableEntry != NULL) { // ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
On 2015/11/10 23:31, Andrew Fish wrote: On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: On Nov 10, 2015, at 12:06 AM, Gao, Liming wrote: Andrew: The patch is missing. Liming, My sent mail shows these 3 patches attached? 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch I attached again here: cat 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch From 4eb94d539de6ee8e4b8eebc43d67dfdfe68e64bf Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:29:54 -0800 Subject: [PATCH 1/4] MdeModulePkg:PeiCore Fix Xcode -Wempty-body warning The single line for(); construct is followd by code that is indented. This trigers the -Wempty-body warning. Fix indentation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Star Zeng diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 7480b66..dbcd800 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -681,15 +681,15 @@ PeiCheckAndSwitchStack ( && (*StackPointer == INIT_CAR_VALUE); StackPointer ++); -DEBUG ((EFI_D_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); -DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) Private->HobList.Raw))); -DEBUG ((EFI_D_INFO, "Total temporary memory:%d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize)); -DEBUG ((EFI_D_INFO, " temporary memory stack ever used: %d bytes.\n", - (UINT32)(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase)) - )); -DEBUG ((EFI_D_INFO, " temporary memory heap used: %d bytes.\n", - (UINT32)((UINTN)Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw) - )); + DEBUG ((EFI_D_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); + DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) Private->HobList.Raw))); + DEBUG ((EFI_D_INFO, "Total temporary memory:%d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize)); + DEBUG ((EFI_D_INFO, " temporary memory stack ever used: %d bytes.\n", + (UINT32)(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase)) +)); + DEBUG ((EFI_D_INFO, " temporary memory heap used: %d bytes.\n", + (UINT32)((UINTN)Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw) +)); DEBUG_CODE_END (); if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) { ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
> On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: > >> >> On Nov 10, 2015, at 12:06 AM, Gao, Liming > <mailto:liming@intel.com>> wrote: >> >> Andrew: >> The patch is missing. >> > > Liming, > > My sent mail shows these 3 patches attached? > 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch > 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch > 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch > > I attached again here: > > >cat 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch >From 56cea06ce806fd0ac9295e1211964f30e6baaac1 Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:42:57 -0800 Subject: [PATCH 3/4] MdeModulePkg: Variable add mising VA_COPY Xcode fails to compile: error: array type 'VA_LIST' (aka '__builtin_va_list') is not assignable Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 621ce16..8a07f0e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -1716,7 +1716,7 @@ CheckRemainingSpaceForConsistencyInternal ( ASSERT_EFI_ERROR (Status); TotalNeededSize = 0; - Args = Marker; + VA_COPY (Args, Marker); VariableEntry = VA_ARG (Args, VARIABLE_ENTRY_CONSISTENCY *); while (VariableEntry != NULL) { // @@ -1745,7 +1745,7 @@ CheckRemainingSpaceForConsistencyInternal ( return FALSE; } - Args = Marker; + VA_COPY (Args, Marker); VariableEntry = VA_ARG (Args, VARIABLE_ENTRY_CONSISTENCY *); while (VariableEntry != NULL) { // -- 2.3.2 (Apple Git-55) > > > Thanks, > > Andrew Fish > >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >> Andrew Fish >> Sent: Tuesday, November 10, 2015 3:18 PM >> To: edk2-devel >> Cc: Tian, Feng >> Subject: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues. >> >> Please review the following patches as they are required to build with Xcode >> 6.3.2. >> >> Thanks, >> >> Andrew Fish >> >> >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org> >> https://lists.01.org/mailman/listinfo/edk2-devel >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org> > https://lists.01.org/mailman/listinfo/edk2-devel > <https://lists.01.org/mailman/listinfo/edk2-devel> ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
> On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: > > >> On Nov 10, 2015, at 12:06 AM, Gao, Liming wrote: >> >> Andrew: >> The patch is missing. >> > > Liming, > > My sent mail shows these 3 patches attached? > 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch > 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch > 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch > > I attached again here: > > >cat 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch >From 7f82886d42a82d939760562ab3f992ae6a3a70b7 Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:31:03 -0800 Subject: [PATCH 2/4] MdeModulePkg: RegularExpressionDxe Xcode warnings fixes ErrorMessage generates a Wpointer-sign error, char * vs unsigned char * assigning structures with = generate memcpy link failures. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c | 9 ++--- MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c | 2 +- .../Universal/RegularExpressionDxe/RegularExpressionDxe.c| 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c index 25b768b..7c9771f 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c @@ -70,7 +70,10 @@ static void swap_node(Node* a, Node* b) { Node c; - c = *a; *a = *b; *b = c; + //c = *a; *a = *b; *b = c; + xmemcpy (&c, a, sizeof (Node)); + xmemcpy (a, b, sizeof (Node)); + xmemcpy (b, &c, sizeof (Node)); if (NTYPE(a) == NT_STR) { StrNode* sn = NSTR(a); @@ -4348,7 +4351,7 @@ clear_opt_map_info(OptMapInfo* map) static void copy_opt_map_info(OptMapInfo* to, OptMapInfo* from) { - *to = *from; + xmemcpy(to, from, sizeof(OptMapInfo)); } static void @@ -4463,7 +4466,7 @@ clear_node_opt_info(NodeOptInfo* opt) static void copy_node_opt_info(NodeOptInfo* to, NodeOptInfo* from) { - *to = *from; + xmemcpy(to, from, sizeof (NodeOptInfo)); } static void diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c index 01ac2b3..38fceb4 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c @@ -2211,7 +2211,7 @@ onig_reduce_nested_quantifier(Node* pnode, Node* cnode) switch(ReduceTypeTable[cnum][pnum]) { case RQ_DEL: -*pnode = *cnode; +xmemcpy (pnode, cnode, sizeof (Node)); break; case RQ_A: p->target = c->target; diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c index a3eebf7..453c1eb 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c @@ -120,7 +120,7 @@ OnigurumaMatch ( ); if (OnigResult != ONIG_NORMAL) { -onig_error_code_to_str (ErrorMessage, OnigResult, &ErrorInfo); +onig_error_code_to_str ((OnigUChar *)ErrorMessage, OnigResult, &ErrorInfo); DEBUG ((DEBUG_ERROR, "Regex compilation failed: %a\n", ErrorMessage)); return EFI_DEVICE_ERROR; } @@ -144,7 +144,7 @@ OnigurumaMatch ( } else { *Result = FALSE; if (OnigResult != ONIG_MISMATCH) { - onig_error_code_to_str (ErrorMessage, OnigResult); + onig_error_code_to_str ((OnigUChar *)ErrorMessage, OnigResult); DEBUG ((DEBUG_ERROR, "Regex match failed: %a\n", ErrorMessage)); } } -- 2.3.2 (Apple Git-55) > > > Thanks, > > Andrew Fish > >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >> Andrew Fish >> Sent: Tuesday, November 10, 2015 3:18 PM >> To: edk2-devel >> Cc: Tian, Feng >> Subject: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues. >> >> Please review the following patches as they are required to build with Xcode >> 6.3.2. >> >> Thanks, >> >> Andrew Fish >> >> >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org> >> https://lists.01.org/mailman/listinfo/edk2-devel >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
> On Nov 10, 2015, at 7:04 AM, Andrew Fish wrote: > > >> On Nov 10, 2015, at 12:06 AM, Gao, Liming wrote: >> >> Andrew: >> The patch is missing. >> > > Liming, > > My sent mail shows these 3 patches attached? > 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch > 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch > 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch > > I attached again here: > >cat 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch >From 4eb94d539de6ee8e4b8eebc43d67dfdfe68e64bf Mon Sep 17 00:00:00 2001 From: andrew fish Date: Mon, 9 Nov 2015 22:29:54 -0800 Subject: [PATCH 1/4] MdeModulePkg:PeiCore Fix Xcode -Wempty-body warning The single line for(); construct is followd by code that is indented. This trigers the -Wempty-body warning. Fix indentation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 7480b66..dbcd800 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -681,15 +681,15 @@ PeiCheckAndSwitchStack ( && (*StackPointer == INIT_CAR_VALUE); StackPointer ++); -DEBUG ((EFI_D_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); -DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) Private->HobList.Raw))); -DEBUG ((EFI_D_INFO, "Total temporary memory:%d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize)); -DEBUG ((EFI_D_INFO, " temporary memory stack ever used: %d bytes.\n", - (UINT32)(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase)) - )); -DEBUG ((EFI_D_INFO, " temporary memory heap used: %d bytes.\n", - (UINT32)((UINTN)Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw) - )); + DEBUG ((EFI_D_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); + DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) Private->HobList.Raw))); + DEBUG ((EFI_D_INFO, "Total temporary memory:%d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize)); + DEBUG ((EFI_D_INFO, " temporary memory stack ever used: %d bytes.\n", + (UINT32)(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase)) +)); + DEBUG ((EFI_D_INFO, " temporary memory heap used: %d bytes.\n", + (UINT32)((UINTN)Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw) +)); DEBUG_CODE_END (); if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) { -- 2.3.2 (Apple Git-55) > > > > Thanks, > > Andrew Fish > >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >> Andrew Fish >> Sent: Tuesday, November 10, 2015 3:18 PM >> To: edk2-devel >> Cc: Tian, Feng >> Subject: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues. >> >> Please review the following patches as they are required to build with Xcode >> 6.3.2. >> >> Thanks, >> >> Andrew Fish >> >> >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org> >> https://lists.01.org/mailman/listinfo/edk2-devel >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
> On Nov 10, 2015, at 12:06 AM, Gao, Liming wrote: > > Andrew: > The patch is missing. > Liming, My sent mail shows these 3 patches attached? 0001-MdeModulePkg-PeiCore-Fix-Xcode-Wempty-body-warning.patch 0002-MdeModulePkg-RegularExpressionDxe-Xcode-warnings-fix.patch 0003-MdeModulePkg-Variable-add-mising-VA_COPY.patch I attached again here: Thanks, Andrew Fish > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Andrew > Fish > Sent: Tuesday, November 10, 2015 3:18 PM > To: edk2-devel > Cc: Tian, Feng > Subject: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues. > > Please review the following patches as they are required to build with Xcode > 6.3.2. > > Thanks, > > Andrew Fish > > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org> > https://lists.01.org/mailman/listinfo/edk2-devel > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
Andrew: The patch is missing. From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Andrew Fish Sent: Tuesday, November 10, 2015 3:18 PM To: edk2-devel Cc: Tian, Feng Subject: [edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues. Please review the following patches as they are required to build with Xcode 6.3.2. Thanks, Andrew Fish ___ edk2-devel mailing list edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org> https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] MdeModulePkg: Fix Xcode 6.3.2/clang compilation issues.
Please review the following patches as they are required to build with Xcode 6.3.2. Thanks, Andrew Fish ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel