(cc MdePkg and BaseTools maintainers)
On Thu, 14 Dec 2023 at 00:08, Mike Beaton wrote:
>
> From: Mike Beaton
>
> The variant provided when MDEPKG_NDEBUG is defined will be optimised
> away in RELEASE builds, but by referencing the argument list, avoids
> unused variable errors from valid debug
Got it. These are the fixes for ArmVirtQemu.dsc. If people have
already manually worked round this issue it interferes with this
global fix (we had this in one file in Acidanthera code). There don't
seem to be many instances of that in the entire EDK-II codebase,
however, fortunately.
diff --git
I have currently gone with `if (FALSE)` in the above, even though
Michael Brown kindly offered tests which showed that `if ((FALSE))`
might help in a closely related context - i.e. when discussing
Mikhail's variant of this and related code - two years ago now:
From: Mike Beaton
The variant provided when MDEPKG_NDEBUG is defined will be optimised
away in RELEASE builds, but by referencing the argument list, avoids
unused variable errors from valid debug code, for example when STATIC
variables are used only in DEBUG statements.
Signed-off-by: Mike