Re: [PATCH 1/1] add value for _h_errno in _REENT_INIT(var) for struct, _reent

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Jun 18 17:44, Johannes Rosa wrote:
> The define '_REENT_INIT' for the case '!_REENT_SMALL' was missing an initializing value for 'int _h_errno'.
> If code uses the _REENT_INIT() macro to preset a variable of type struct _reent, this led to an issue when compiling with -Wmissing-field-initializers.
> ---
>  newlib/libc/include/sys/reent.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
> index 5ce53873a..eafac960f 100644
> --- a/newlib/libc/include/sys/reent.h
> +++ b/newlib/libc/include/sys/reent.h
> @@ -709,7 +709,8 @@ struct _reent
>          {0, {0}}, \
>          {0, {0}}, \
>          {0, {0}}, \
> -        {0, {0}} \
> +        {0, {0}}, \
> +		0 \
>        } \
>      }, \
>      _REENT_INIT_RESERVED_6_7 \
> -- 
> 2.34.1

Pushed.

Thanks,
Corinna
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.