Support compile time argument consistency checking for functions that
accept a PrintLib format string followed by a variable argument list.
Macro 'EFIFORMAT' added to the function prototype accepts a single
argument indicating which function argument holds the format string.
The EFIFORMAT macro assumes the variable argument list immediately
follows the format string. Format string argument checking requires
a compiler that understands EDK2 format strings, such as GCC with
the gcc_format from BaseTools/gcc applied.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <sc...@notabs.org>
---


 UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h 
b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
index b28e9c5..4fe9192 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
@@ -92,6 +92,7 @@ ArchGetIdtHandler (
 **/
 VOID
 EFIAPI
+EFIFORMAT (1)
 InternalPrintMessage (
   IN  CONST CHAR8  *Format,
   ...


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to