MdeModulePkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767

Update use of DEBUG_CODE(Expression) if Expression is a complex code
block with if/while/for/case statements that use {}.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael D Kinney
2021-12-05 14:33:53 -08:00
committed by mergify[bot]
parent 4a9d411662
commit db52c7f755
17 changed files with 48 additions and 50 deletions

View File

@@ -1387,7 +1387,7 @@ BmExpandLoadFile (
//
FileBuffer = AllocateReservedPages (EFI_SIZE_TO_PAGES (BufferSize));
if (FileBuffer == NULL) {
DEBUG_CODE (
DEBUG_CODE_BEGIN ();
EFI_DEVICE_PATH *LoadFilePath;
CHAR16 *LoadFileText;
CHAR16 *FileText;
@@ -1417,7 +1417,7 @@ BmExpandLoadFile (
if (LoadFileText != NULL) {
FreePool (LoadFileText);
}
);
DEBUG_CODE_END ();
return NULL;
}

View File

@@ -545,7 +545,7 @@ BmRepairAllControllers (
EfiBootManagerFreeDriverHealthInfo (DriverHealthInfo, Count);
DEBUG_CODE (
DEBUG_CODE_BEGIN ();
CHAR16 *ControllerName;
DriverHealthInfo = EfiBootManagerGetDriverHealthInfo (&Count);
@@ -567,7 +567,7 @@ BmRepairAllControllers (
}
}
EfiBootManagerFreeDriverHealthInfo (DriverHealthInfo, Count);
);
DEBUG_CODE_END ();
if (ReconnectRequired) {
if (ReconnectRepairCount < MAX_RECONNECT_REPAIR) {