UEFI edk2 Compile error: unused variable

sed "s:-Wall -Werror:-Wall:g" BaseTools/Source/C/Makefiles/header.makefile -i
sed "s:-Wall -Werror:-Wall:g" BaseTools/Conf/tools_def.template -i
sed "s:-Wall -Werror:-Wall:g" Conf/tools_def.txt -i

Test:

/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1245:23: warning: unused variable ‘FileHandle’ [-Wunused-variable]
 1245 |     SHELL_FILE_HANDLE FileHandle;
      |                       ^~~~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1243:14: warning: unused variable ‘ArrayBuffer’ [-Wunused-variable]
 1243 |     CHAR16 * ArrayBuffer  = NULL;
      |              ^~~~~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1242:13: warning: unused variable ‘NewFileName’ [-Wunused-variable]
 1242 |     CHAR16  NewFileName[128] = {0};
      |             ^~~~~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1241:14: warning: unused variable ‘LineBuff’ [-Wunused-variable]
 1241 |     CHAR16  *LineBuff = NULL;
      |              ^~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1240:13: warning: unused variable ‘OldLogFileName’ [-Wunused-variable]
 1240 |     CHAR16  OldLogFileName[] = L"test.txt";
 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
In file included from /home/chen-docker/bin/boot/boot_images/edk2/MdePkg/Include/Uefi.h:18: In file included from /home/chen-docker/bin/boot/boot_images/edk2/MdePkg/Include/Uefi/UefiSpec.h:2222: /home/chen-docker/bin/boot/boot_images/edk2/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +1755:12: error: field Guid within 'EFI_HII_KEYBOARD_LAYOUT' is less aligned than 'EFI_GUID' (aka 'GUID') and is usually due to 'EFI_HII_KEYBOARD_LAYOUT' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] EFI_GUID Guid; ^ 1 error generated. In file included from /home/chen-docker/bin/boot/boot_images/edk2/MdeModulePkg/Library/UefiHiiLib/HiiLib.c:1: In file included from <built-in>:1: In file included from /home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/DEBUG/AutoGen.h:16: In file included from /home/chen-docker/bin/boot/boot_images/edk2/MdePkg/Include/Uefi.h:18: In file included from /home/chen-docker/bin/boot/boot_images/edk2/MdePkg/Include/Uefi/UefiSpec.h:2222: /home/chen-docker/bin/boot/boot_images/edk2/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +1755:12: error: field Guid within 'EFI_HII_KEYBOARD_LAYOUT' is less aligned than 'EFI_GUID' (aka 'GUID') and is usually due to 'EFI_HII_KEYBOARD_LAYOUT' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] EFI_GUID Guid; ^ GNUmakefile:366: recipe for target '/home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib/OUTPUT/UefiHiiServicesLib.obj' failed make: *** [/home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib/OUTPUT/UefiHiiServicesLib.obj] Error 1 什么错误?
最新发布
07-20

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值