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>
---


 SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h 
b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
index 64e4c3e..c831314 100644
--- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
+++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
@@ -290,6 +290,7 @@ DebugReadBreakSymbol (
 **/
 VOID
 EFIAPI
+EFIFORMAT (2)
 DebugAgentMsgPrint (
   IN UINT8         ErrorLevel,
   IN CHAR8         *Format,


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

Reply via email to