diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2021-12-05 14:33:53 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | db52c7f755885d2f42279ba0d967c5d646d017b1 (patch) | |
tree | 07e0902972606385aba6c20cf36829fdd76a23db /MdeModulePkg/Universal/Variable | |
parent | 4a9d41166224346621981ce98add027d56901b53 (diff) | |
download | edk2-db52c7f755885d2f42279ba0d967c5d646d017b1.zip edk2-db52c7f755885d2f42279ba0d967c5d646d017b1.tar.gz edk2-db52c7f755885d2f42279ba0d967c5d646d017b1.tar.bz2 |
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>
Diffstat (limited to 'MdeModulePkg/Universal/Variable')
-rw-r--r-- | MdeModulePkg/Universal/Variable/Pei/Variable.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c index 468b732..7e4fa60 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.c +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c @@ -512,7 +512,7 @@ GetHobVariableStore ( //
// Make sure there is no more than one Variable HOB.
//
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);
if (GuidHob != NULL) {
if ((GetNextGuidHob (&gEfiAuthenticatedVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {
@@ -531,7 +531,7 @@ GetHobVariableStore ( }
}
}
- );
+ DEBUG_CODE_END ();
GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);
if (GuidHob != NULL) {
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 5115bcf..adb3e97 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -280,7 +280,7 @@ RecordVarErrorFlag ( VAR_ERROR_FLAG *VarErrFlag;
VAR_ERROR_FLAG TempFlag;
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
if (Flag == VAR_ERROR_FLAG_SYSTEM_ERROR) {
if (AtRuntime ()) {
@@ -291,7 +291,7 @@ RecordVarErrorFlag ( } else {
DEBUG ((DEBUG_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
}
- );
+ DEBUG_CODE_END ();
if (!mEndOfDxe) {
//
@@ -3498,7 +3498,7 @@ GetHobVariableStore ( //
// Make sure there is no more than one Variable HOB.
//
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);
if (GuidHob != NULL) {
if ((GetNextGuidHob (&gEfiAuthenticatedVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {
@@ -3517,7 +3517,7 @@ GetHobVariableStore ( }
}
}
- );
+ DEBUG_CODE_END ();
//
// Combinations supported:
|