Re: [PATCH 1/3] libc/sys/rtems/crt0.c: Fix two warnings.

Joel Sherrill <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAF9ehCX3S3e9hjDLiyLw6JZMyLkBX4cZPDScyeP+tLSZSUpZrQ@mail.gmail.com>
Ignore this. Already committed. Just was laying around in my patch output
directory.

On Thu, Jun 17, 2021 at 4:50 PM Joel Sherrill <[email protected]> wrote:

>         __assert_func() is marked as noreturn and stub should not.
>         __tls_get_addr() needed to return a value..
> ---
>  newlib/libc/sys/rtems/crt0.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c
> index 6b8b5f98f..3b131d9c4 100644
> --- a/newlib/libc/sys/rtems/crt0.c
> +++ b/newlib/libc/sys/rtems/crt0.c
> @@ -195,13 +195,13 @@ RTEMS_STUB(void *, _malloc_r(struct _reent * r,
> size_t s), { return 0; })
>  RTEMS_STUB(void, _free_r(struct _reent *r, void *p), { })
>
>  /* stubs for functions required by libc/stdlib */
> -RTEMS_STUB(void, __assert_func(const char *file, int line, const char
> *func, const char *failedexpr), { })
> +RTEMS_STUB(void, __assert_func(const char *file, int line, const char
> *func, const char *failedexpr), { while (1) ;})
>
>  #if defined(__arm__)
>  RTEMS_STUB(void, __aeabi_read_tp(void), { })
>  #endif
>
> -RTEMS_STUB(void *, __tls_get_addr(const void *ti), { })
> +RTEMS_STUB(void *, __tls_get_addr(const void *ti), { return NULL; })
>
>  /* The PowerPC expects certain symbols to be defined in the linker
> script. */
>
> --
> 2.24.4
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.