[edk2] [PATCH] MdePkg/UefiLib: Add 'OUT' decorator where necessary.

Marvin Häuser posted 1 patch 6 years, 9 months ago
Failed in applying to current master (apply log)
MdePkg/Library/UefiLib/UefiLib.c | 18 +++++++++---------
MdePkg/Include/Library/UefiLib.h | 18 +++++++++---------
2 files changed, 18 insertions(+), 18 deletions(-)
[edk2] [PATCH] MdePkg/UefiLib: Add 'OUT' decorator where necessary.
Posted by Marvin Häuser 6 years, 9 months ago
The functions AddUnicodeString() and AddUnicodeString2() might return
a new value into their parameter UnicodeStringTable, hence add the
appropiate 'OUT' decorator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
---
 MdePkg/Library/UefiLib/UefiLib.c | 18 +++++++++---------
 MdePkg/Include/Library/UefiLib.h | 18 +++++++++---------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index f1a3f1c7af05..ba449a1c34ce 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -888,10 +888,10 @@ LookupUnicodeString2 (
 EFI_STATUS
 EFIAPI
 AddUnicodeString (
-  IN CONST CHAR8               *Language,
-  IN CONST CHAR8               *SupportedLanguages,
-  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
-  IN CONST CHAR16              *UnicodeString
+  IN     CONST CHAR8               *Language,
+  IN     CONST CHAR8               *SupportedLanguages,
+  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
+  IN     CONST CHAR16              *UnicodeString
   )
 {
   UINTN                     NumberOfEntries;
@@ -1065,11 +1065,11 @@ AddUnicodeString (
 EFI_STATUS
 EFIAPI
 AddUnicodeString2 (
-  IN CONST CHAR8               *Language,
-  IN CONST CHAR8               *SupportedLanguages,
-  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
-  IN CONST CHAR16              *UnicodeString,
-  IN BOOLEAN                   Iso639Language
+  IN     CONST CHAR8               *Language,
+  IN     CONST CHAR8               *SupportedLanguages,
+  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
+  IN     CONST CHAR16              *UnicodeString,
+  IN     BOOLEAN                   Iso639Language
   )
 {
   UINTN                     NumberOfEntries;
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index 54bc2cc5a334..256498e3fd8d 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -587,10 +587,10 @@ LookupUnicodeString2 (
 EFI_STATUS
 EFIAPI
 AddUnicodeString (
-  IN CONST CHAR8               *Language,
-  IN CONST CHAR8               *SupportedLanguages,
-  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
-  IN CONST CHAR16              *UnicodeString
+  IN     CONST CHAR8               *Language,
+  IN     CONST CHAR8               *SupportedLanguages,
+  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
+  IN     CONST CHAR16              *UnicodeString
   );
 
 /**
@@ -638,11 +638,11 @@ AddUnicodeString (
 EFI_STATUS
 EFIAPI
 AddUnicodeString2 (
-  IN CONST CHAR8               *Language,
-  IN CONST CHAR8               *SupportedLanguages,
-  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
-  IN CONST CHAR16              *UnicodeString,
-  IN BOOLEAN                   Iso639Language
+  IN     CONST CHAR8               *Language,
+  IN     CONST CHAR8               *SupportedLanguages,
+  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
+  IN     CONST CHAR16              *UnicodeString,
+  IN     BOOLEAN                   Iso639Language
   );
 
 /**
-- 
2.16.0.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] MdePkg/UefiLib: Add 'OUT' decorator where necessary.
Posted by Gao, Liming 6 years, 9 months ago
Please also update the one in IntelFrameworkPkg UefiLib.

> -----Original Message-----
> From: Marvin Häuser [mailto:Marvin.Haeuser@outlook.com]
> Sent: Wednesday, February 28, 2018 12:47 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [PATCH] MdePkg/UefiLib: Add 'OUT' decorator where necessary.
> 
> The functions AddUnicodeString() and AddUnicodeString2() might return
> a new value into their parameter UnicodeStringTable, hence add the
> appropiate 'OUT' decorator.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
> ---
>  MdePkg/Library/UefiLib/UefiLib.c | 18 +++++++++---------
>  MdePkg/Include/Library/UefiLib.h | 18 +++++++++---------
>  2 files changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
> index f1a3f1c7af05..ba449a1c34ce 100644
> --- a/MdePkg/Library/UefiLib/UefiLib.c
> +++ b/MdePkg/Library/UefiLib/UefiLib.c
> @@ -888,10 +888,10 @@ LookupUnicodeString2 (
>  EFI_STATUS
>  EFIAPI
>  AddUnicodeString (
> -  IN CONST CHAR8               *Language,
> -  IN CONST CHAR8               *SupportedLanguages,
> -  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> -  IN CONST CHAR16              *UnicodeString
> +  IN     CONST CHAR8               *Language,
> +  IN     CONST CHAR8               *SupportedLanguages,
> +  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> +  IN     CONST CHAR16              *UnicodeString
>    )
>  {
>    UINTN                     NumberOfEntries;
> @@ -1065,11 +1065,11 @@ AddUnicodeString (
>  EFI_STATUS
>  EFIAPI
>  AddUnicodeString2 (
> -  IN CONST CHAR8               *Language,
> -  IN CONST CHAR8               *SupportedLanguages,
> -  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> -  IN CONST CHAR16              *UnicodeString,
> -  IN BOOLEAN                   Iso639Language
> +  IN     CONST CHAR8               *Language,
> +  IN     CONST CHAR8               *SupportedLanguages,
> +  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> +  IN     CONST CHAR16              *UnicodeString,
> +  IN     BOOLEAN                   Iso639Language
>    )
>  {
>    UINTN                     NumberOfEntries;
> diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
> index 54bc2cc5a334..256498e3fd8d 100644
> --- a/MdePkg/Include/Library/UefiLib.h
> +++ b/MdePkg/Include/Library/UefiLib.h
> @@ -587,10 +587,10 @@ LookupUnicodeString2 (
>  EFI_STATUS
>  EFIAPI
>  AddUnicodeString (
> -  IN CONST CHAR8               *Language,
> -  IN CONST CHAR8               *SupportedLanguages,
> -  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> -  IN CONST CHAR16              *UnicodeString
> +  IN     CONST CHAR8               *Language,
> +  IN     CONST CHAR8               *SupportedLanguages,
> +  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> +  IN     CONST CHAR16              *UnicodeString
>    );
> 
>  /**
> @@ -638,11 +638,11 @@ AddUnicodeString (
>  EFI_STATUS
>  EFIAPI
>  AddUnicodeString2 (
> -  IN CONST CHAR8               *Language,
> -  IN CONST CHAR8               *SupportedLanguages,
> -  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> -  IN CONST CHAR16              *UnicodeString,
> -  IN BOOLEAN                   Iso639Language
> +  IN     CONST CHAR8               *Language,
> +  IN     CONST CHAR8               *SupportedLanguages,
> +  IN OUT EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,
> +  IN     CONST CHAR16              *UnicodeString,
> +  IN     BOOLEAN                   Iso639Language
>    );
> 
>  /**
> --
> 2.16.0.windows.2

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