Message ID | 20201001141753.6657-3-torbjorn.svensson@st.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Looks good. Could you please resend the patch as an attachment? Thanks, -- Jeff J. On Thu, Oct 1, 2020 at 10:19 AM Torbjörn SVENSSON via Newlib < newlib@sourceware.org> wrote: > As discussed in GCC bug 97088 > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in > prototypes of library functions should use reserved names, or no name > at all. > > This patch removes the 'ptr' parameter name from > wint_t _getwchar_r (struct _reent *); > wint_t _getwchar_unlocked_r (struct _reent *); > > to avoid possible clashes with user code in case someone uses > before including Newlib's wchar.h (or uses some other conflicting > definition) > > Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com> > --- > newlib/libc/include/wchar.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h > index c04a6510e..0d3e636f9 100644 > --- a/newlib/libc/include/wchar.h > +++ b/newlib/libc/include/wchar.h > @@ -248,8 +248,8 @@ int _fputws_unlocked_r (struct _reent *, const wchar_t > *, __FILE *); > int _fwide_r (struct _reent *, __FILE *, int); > wint_t _getwc_r (struct _reent *, __FILE *); > wint_t _getwc_unlocked_r (struct _reent *, __FILE *); > -wint_t _getwchar_r (struct _reent *ptr); > -wint_t _getwchar_unlocked_r (struct _reent *ptr); > +wint_t _getwchar_r (struct _reent *); > +wint_t _getwchar_unlocked_r (struct _reent *); > wint_t _putwc_r (struct _reent *, wchar_t, __FILE *); > wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *); > wint_t _putwchar_r (struct _reent *, wchar_t); > -- > 2.18.0 > >
Patch attached. From: Jeff Johnston <jjohnstn@redhat.com> Sent: den 2 oktober 2020 01:24 To: Torbjorn SVENSSON <torbjorn.svensson@st.com> Cc: Newlib <newlib@sourceware.org> Subject: Re: [PATCH 2/3] libc/include/wchar.h: Remove parameter name Looks good. Could you please resend the patch as an attachment? Thanks, -- Jeff J. On Thu, Oct 1, 2020 at 10:19 AM Torbjörn SVENSSON via Newlib <newlib@sourceware.org<mailto:newlib@sourceware.org>> wrote: As discussed in GCC bug 97088 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in prototypes of library functions should use reserved names, or no name at all. This patch removes the 'ptr' parameter name from wint_t _getwchar_r (struct _reent *); wint_t _getwchar_unlocked_r (struct _reent *); to avoid possible clashes with user code in case someone uses before including Newlib's wchar.h (or uses some other conflicting definition) Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com<mailto:torbjorn.svensson@st.com>> --- newlib/libc/include/wchar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h index c04a6510e..0d3e636f9 100644 --- a/newlib/libc/include/wchar.h +++ b/newlib/libc/include/wchar.h @@ -248,8 +248,8 @@ int _fputws_unlocked_r (struct _reent *, const wchar_t *, __FILE *); int _fwide_r (struct _reent *, __FILE *, int); wint_t _getwc_r (struct _reent *, __FILE *); wint_t _getwc_unlocked_r (struct _reent *, __FILE *); -wint_t _getwchar_r (struct _reent *ptr); -wint_t _getwchar_unlocked_r (struct _reent *ptr); +wint_t _getwchar_r (struct _reent *); +wint_t _getwchar_unlocked_r (struct _reent *); wint_t _putwc_r (struct _reent *, wchar_t, __FILE *); wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *); wint_t _putwchar_r (struct _reent *, wchar_t); -- 2.18.0
Patch applied. Thanks. -- Jeff J. On Fri, Oct 2, 2020 at 2:53 AM Torbjorn SVENSSON <torbjorn.svensson@st.com> wrote: > Patch attached. > > > > *From:* Jeff Johnston <jjohnstn@redhat.com> > *Sent:* den 2 oktober 2020 01:24 > *To:* Torbjorn SVENSSON <torbjorn.svensson@st.com> > *Cc:* Newlib <newlib@sourceware.org> > *Subject:* Re: [PATCH 2/3] libc/include/wchar.h: Remove parameter name > > > > Looks good. Could you please resend the patch as an attachment? > > > > Thanks, > > > > -- Jeff J. > > > > On Thu, Oct 1, 2020 at 10:19 AM Torbjörn SVENSSON via Newlib < > newlib@sourceware.org> wrote: > > As discussed in GCC bug 97088 > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in > prototypes of library functions should use reserved names, or no name > at all. > > This patch removes the 'ptr' parameter name from > wint_t _getwchar_r (struct _reent *); > wint_t _getwchar_unlocked_r (struct _reent *); > > to avoid possible clashes with user code in case someone uses > before including Newlib's wchar.h (or uses some other conflicting > definition) > > Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com> > --- > newlib/libc/include/wchar.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h > index c04a6510e..0d3e636f9 100644 > --- a/newlib/libc/include/wchar.h > +++ b/newlib/libc/include/wchar.h > @@ -248,8 +248,8 @@ int _fputws_unlocked_r (struct _reent *, const wchar_t > *, __FILE *); > int _fwide_r (struct _reent *, __FILE *, int); > wint_t _getwc_r (struct _reent *, __FILE *); > wint_t _getwc_unlocked_r (struct _reent *, __FILE *); > -wint_t _getwchar_r (struct _reent *ptr); > -wint_t _getwchar_unlocked_r (struct _reent *ptr); > +wint_t _getwchar_r (struct _reent *); > +wint_t _getwchar_unlocked_r (struct _reent *); > wint_t _putwc_r (struct _reent *, wchar_t, __FILE *); > wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *); > wint_t _putwchar_r (struct _reent *, wchar_t); > -- > 2.18.0 > >
diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h index c04a6510e..0d3e636f9 100644 --- a/newlib/libc/include/wchar.h +++ b/newlib/libc/include/wchar.h @@ -248,8 +248,8 @@ int _fputws_unlocked_r (struct _reent *, const wchar_t *, __FILE *); int _fwide_r (struct _reent *, __FILE *, int); wint_t _getwc_r (struct _reent *, __FILE *); wint_t _getwc_unlocked_r (struct _reent *, __FILE *); -wint_t _getwchar_r (struct _reent *ptr); -wint_t _getwchar_unlocked_r (struct _reent *ptr); +wint_t _getwchar_r (struct _reent *); +wint_t _getwchar_unlocked_r (struct _reent *); wint_t _putwc_r (struct _reent *, wchar_t, __FILE *); wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *); wint_t _putwchar_r (struct _reent *, wchar_t);
As discussed in GCC bug 97088 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in prototypes of library functions should use reserved names, or no name at all. This patch removes the 'ptr' parameter name from wint_t _getwchar_r (struct _reent *); wint_t _getwchar_unlocked_r (struct _reent *); to avoid possible clashes with user code in case someone uses before including Newlib's wchar.h (or uses some other conflicting definition) Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com> --- newlib/libc/include/wchar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.18.0