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 edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel