rtems: No-return _arc4random_getentropy_fail()

Message ID 20250702073929.107261-1-sebastian.huber@embedded-brains.de
State New
Headers
Series rtems: No-return _arc4random_getentropy_fail() |

Commit Message

Sebastian Huber July 2, 2025, 7:39 a.m. UTC
  The _arc4random_getentropy_fail() function does not return.  Mark it as
such.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/sys/rtems/include/machine/_arc4random.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Corinna Vinschen July 3, 2025, 3:53 p.m. UTC | #1
Hi Sebastian,

I think you can tweak RTMES files without waiting for approval
from Jeff or me.

Thanks,
Corinna

On Jul  2 09:39, Sebastian Huber wrote:
> The _arc4random_getentropy_fail() function does not return.  Mark it as
> such.
> 
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
>  newlib/libc/sys/rtems/include/machine/_arc4random.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/sys/rtems/include/machine/_arc4random.h b/newlib/libc/sys/rtems/include/machine/_arc4random.h
> index 7ef296899..83b8493f1 100644
> --- a/newlib/libc/sys/rtems/include/machine/_arc4random.h
> +++ b/newlib/libc/sys/rtems/include/machine/_arc4random.h
> @@ -28,7 +28,7 @@
>  
>  __BEGIN_DECLS
>  
> -void _arc4random_getentropy_fail(void);
> +_Noreturn void _arc4random_getentropy_fail(void);
>  
>  #define _ARC4RANDOM_GETENTROPY_FAIL() _arc4random_getentropy_fail()
>  
> -- 
> 2.43.0
  

Patch

diff --git a/newlib/libc/sys/rtems/include/machine/_arc4random.h b/newlib/libc/sys/rtems/include/machine/_arc4random.h
index 7ef296899..83b8493f1 100644
--- a/newlib/libc/sys/rtems/include/machine/_arc4random.h
+++ b/newlib/libc/sys/rtems/include/machine/_arc4random.h
@@ -28,7 +28,7 @@ 
 
 __BEGIN_DECLS
 
-void _arc4random_getentropy_fail(void);
+_Noreturn void _arc4random_getentropy_fail(void);
 
 #define _ARC4RANDOM_GETENTROPY_FAIL() _arc4random_getentropy_fail()