]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/EdkDxePrintLib/PrintLib.c
fix ECC tool's warning
[mirror_edk2.git] / MdeModulePkg / Library / EdkDxePrintLib / PrintLib.c
index 1659327dc511771c5e5ff056d0664eaa929c0cbc..78c49ad38638af6ffa1eb5e69fbe5835ca85385a 100644 (file)
@@ -1,4 +1,5 @@
 /** @file\r
+  Instance of Print Library based on EFI_PRINT2_PROTOCOL.\r
 \r
   Implement the print library instance by wrap the interface \r
   provided in the Print protocol. This protocol is defined as the internal\r
@@ -23,14 +24,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PrintLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 \r
-static EFI_PRINT2_PROTOCOL  *gPrintProtocol = NULL;\r
+EFI_PRINT2_PROTOCOL  *gPrintProtocol = NULL;\r
 \r
+/**\r
+  Internal function to locate the EFI_PRINT2_PROTOCOL.\r
+\r
+  @retval  EFI_SUCCESS   EFI_PRINT2_PROTOCOL is successfuly located.\r
+  @retval  EFI_NOT_FOUND EFI_PRINT2_PROTOCOL cannot be found.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InternalLocatePrintProtocol (\r
+  VOID\r
   )\r
 {\r
-  EFI_STATUS  Status = EFI_SUCCESS;\r
+  EFI_STATUS  Status;\r
 \r
   if (gPrintProtocol == NULL) {\r
     Status = gBS->LocateProtocol (\r
@@ -124,7 +133,9 @@ UnicodeVSPrint (
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
-  \r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
+\r
   @return The number of Unicode characters in the produced output buffer not including the\r
           Null-terminator.\r
 \r
@@ -220,6 +231,8 @@ UnicodeVSPrintAsciiFormat (
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
   \r
   @return The number of Unicode characters in the produced output buffer not including the\r
           Null-terminator.\r
@@ -371,7 +384,9 @@ AsciiVSPrint (
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
-  \r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
+\r
   @return The number of ASCII characters in the produced output buffer not including the\r
           Null-terminator.\r
 \r
@@ -467,7 +482,9 @@ AsciiVSPrintUnicodeFormat (
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
-  \r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
+\r
   @return The number of ASCII characters in the produced output buffer not including the\r
           Null-terminator.\r
 \r
@@ -531,10 +548,10 @@ AsciiSPrintUnicodeFormat (
 UINTN\r
 EFIAPI\r
 AsciiValueToString (\r
-  IN OUT CHAR8  *Buffer,\r
-  IN UINTN      Flags,\r
-  IN INT64      Value,\r
-  IN UINTN      Width\r
+  OUT CHAR8      *Buffer,\r
+  IN  UINTN      Flags,\r
+  IN  INT64      Value,\r
+  IN  UINTN      Width\r
   )\r
 {\r
   if (InternalLocatePrintProtocol() != EFI_SUCCESS) {\r