Ard:
  Thanks for your contribution. I agree to enable this warning in DEBUG only. 
Reviewed-by: Liming Gao <[email protected]> for this serials. 

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:[email protected]] On Behalf Of
> Ard Biesheuvel
> Sent: Thursday, March 24, 2016 2:28 PM
> To: [email protected]; [email protected]; Gao, Liming; Zeng, Star;
> Tian, Feng; Qiu, Shumin; Carsey, Jaben; Fan, Jeff
> Cc: Ard Biesheuvel
> Subject: [edk2] [PATCH 0/4] detect unused but set variables on GCC/X64 and
> GCC/IA32
> 
> This is a followup to Laszlo's post a couple of days ago. I fixed a couple
> of occurrences where the new GCC flags in patch #4 cause build errors, but
> since Laszlo mentioned 33 patches and counting, there may be other
> instances
> that need to be fixed before #4 can be considered for merging.
> 
> The difference with Laszlo's approach is that this time, we disable the
> warning
> only for release builds. This works around the problem where code gets
> compiled
> out on RELEASE builds, which may result in variables that are only accessed in
> DEBUG() output to be mistaken for unused-but-set variables. By enabling
> the
> warning only on DEBUG, we still get the coverage, and better code, but
> without
> inadvertently breaking the RELEASE build for code that is fine.
> 
> Ard Biesheuvel (4):
>   MdeModulePkg/PciHostBridgeDxe: remove unused but set variables
>   ShellPkg/UefiShellDebug1CommandsLib: remove unused but set variable
>   UefiCpuPkg/MtrrLib: remove unused but set variable
>   BaseTools/GCC: set -Wno-unused-but-set-variables only on RELEASE
>     builds
> 
>  BaseTools/Conf/tools_def.template                             | 36 
> ++++++++++++++----
> --
>  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c         |  8 -----
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c |  4 ---
>  UefiCpuPkg/Library/MtrrLib/MtrrLib.c                          |  2 --
>  4 files changed, 26 insertions(+), 24 deletions(-)
> 
> --
> 1.9.1
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to