On 2015/10/22 23:54, Andrew Fish wrote:
/Users/andrewfish/work/src/edk2/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c:682:28:
 error: for loop has empty body [-Werror,-Wempty-body]
            StackPointer ++);
                            ^
/Users/andrewfish/work/src/edk2/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c:682:28:
 note: put the semicolon on a separate line to silence this warning
1 error generated.

Do you have full code base and all package build about this warning?
I can some for loop like below in UefiLib.c AddUnicodeString2(). And there maybe many other places have similar cases I guess since I never met this build failure before.

for (; *SupportedLanguages != 0 && *SupportedLanguages == ';'; SupportedLanguages++);

What's the real value of this build warning? And could you disable this warning the tool chain?

Thanks,
Star


This code change removes the warning.
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c 
b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 7480b66..c563775 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -679,7 +679,8 @@ PeiCheckAndSwitchStack (
        for (StackPointer = (UINT32*)SecCoreData->StackBase;
             (StackPointer < (UINT32*)((UINTN)SecCoreData->StackBase + 
SecCoreData->StackSize)) \
             && (*StackPointer == INIT_CAR_VALUE);
-           StackPointer ++);
+           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)));


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <af...@apple.com <mailto:af...@apple.com>>

Thanks,

Andrew Fish

_______________________________________________
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

Reply via email to