Skip to content

Commit

Permalink
ALT2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebeaton committed Sep 20, 2024
1 parent 9f51576 commit 0cb219a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions MdePkg/Include/Library/DebugLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,10 @@ UnitTestDebugAssert (
are not included in a module.
**/
#define DEBUG_CODE_BEGIN() do { if (DebugCodeEnabled ()) { UINT8 __DebugCodeLocal
#define DEBUG_CODE_BEGIN() \
do { \
if (DebugCodeEnabled ()) { \
do { } while (FALSE)

/**
The macro that marks the end of debug source code.
Expand All @@ -545,7 +548,9 @@ UnitTestDebugAssert (
are not included in a module.
**/
#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE)
#define DEBUG_CODE_END() \
} \
} while (FALSE)

/**
The macro that declares a section of debug source code.
Expand Down
9 changes: 7 additions & 2 deletions MdePkg/Include/Library/PerformanceLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,10 @@ LogPerformanceMeasurement (
Otherwise, the source lines between PERF_CODE_BEGIN() and PERF_CODE_END() are not included in a module.
**/
#define PERF_CODE_BEGIN() do { if (PerformanceMeasurementEnabled ()) { UINT8 __PerformanceCodeLocal
#define PERF_CODE_BEGIN() \
do { \
if (PerformanceMeasurementEnabled ()) { \
(VOID) (1 == 1)

/**
Macro that marks the end of performance measurement source code.
Expand All @@ -744,7 +747,9 @@ LogPerformanceMeasurement (
Otherwise, the source lines between PERF_CODE_BEGIN() and PERF_CODE_END() are not included in a module.
**/
#define PERF_CODE_END() __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE)
#define PERF_CODE_END() \
} \
} while (FALSE)

/**
Macro that declares a section of performance measurement source code.
Expand Down

0 comments on commit 0cb219a

Please sign in to comment.