[edk2] [PATCH 3/3] MdePkg: add NORETURN attribute to LongJump and InternalLongJump

M1cha posted 3 patches 6 years, 10 months ago
There is a newer version of this series
[edk2] [PATCH 3/3] MdePkg: add NORETURN attribute to LongJump and InternalLongJump
Posted by M1cha 6 years, 10 months ago
This fixes compiler warnings when using them in functions which
should return a value but rely on LongJump to never return instead.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
---
 MdePkg/Include/Library/BaseLib.h          | 1 +
 MdePkg/Library/BaseLib/BaseLibInternals.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index 10976032adaa..e2eb46da4584 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -4929,6 +4929,7 @@ SetJump (
 **/
 VOID
 EFIAPI
+NORETURN
 LongJump (
   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,
   IN      UINTN                     Value
diff --git a/MdePkg/Library/BaseLib/BaseLibInternals.h b/MdePkg/Library/BaseLib/BaseLibInternals.h
index 9dca97a0dcc9..3cd5fe34fc1b 100644
--- a/MdePkg/Library/BaseLib/BaseLibInternals.h
+++ b/MdePkg/Library/BaseLib/BaseLibInternals.h
@@ -442,6 +442,7 @@ InternalAssertJumpBuffer (
 
 **/
 VOID
+NORETURN
 EFIAPI
 InternalLongJump (
   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,
-- 
2.15.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 3/3] MdePkg: add NORETURN attribute to LongJump and InternalLongJump
Posted by Ard Biesheuvel 6 years, 10 months ago
On 22 December 2017 at 07:23, M1cha <sigmaepsilon92@gmail.com> wrote:
> This fixes compiler warnings when using them in functions which
> should return a value but rely on LongJump to never return instead.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  MdePkg/Include/Library/BaseLib.h          | 1 +
>  MdePkg/Library/BaseLib/BaseLibInternals.h | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
> index 10976032adaa..e2eb46da4584 100644
> --- a/MdePkg/Include/Library/BaseLib.h
> +++ b/MdePkg/Include/Library/BaseLib.h
> @@ -4929,6 +4929,7 @@ SetJump (
>  **/
>  VOID
>  EFIAPI
> +NORETURN
>  LongJump (
>    IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,
>    IN      UINTN                     Value
> diff --git a/MdePkg/Library/BaseLib/BaseLibInternals.h b/MdePkg/Library/BaseLib/BaseLibInternals.h
> index 9dca97a0dcc9..3cd5fe34fc1b 100644
> --- a/MdePkg/Library/BaseLib/BaseLibInternals.h
> +++ b/MdePkg/Library/BaseLib/BaseLibInternals.h
> @@ -442,6 +442,7 @@ InternalAssertJumpBuffer (
>
>  **/
>  VOID
> +NORETURN
>  EFIAPI
>  InternalLongJump (
>    IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,
> --
> 2.15.1
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel