Re: Cast "const char *" pointers to "char *" to avoid compiler warnings.
Christophe Lyon <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAKdteObfJn-WdXepgW1DRu3__HhKTYDvqTbt3zmb3dmMW=1Zrg@mail.gmail.com> |
On Fri, 5 Oct 2018 at 13:18, Sebastian Huber <[email protected]> wrote: > > On 05/10/2018 11:32, Christophe Lyon wrote: > > commit c6af2b7be0e94935c589307c14eeb9f53901a811 > > Author: Christophe Lyon<[email protected]> > > Date: Mon Oct 1 18:53:37 2018 +0000 > > > > Cast "const char *" pointers to "char *" to avoid compiler warnings. > > > > 2018-10-01 Christophe Lyon<[email protected]> > > > > * newlib/libc/ctype/ctype_.c (__set_ctype): Cast "_ctype_" to "char *". > > * newlib/libc/locale/locale.c (__loadlocale): Cast "new_locale" to > > "char *". > > There is a __DECONST() macro in <sys/cdefs.h>. I think this better > documents the purpose of these casts. It silences also -Wcast-qual warnings. > Hmmm, it seems it isn't used anywhere in the newlib sources, is it really a good idea? I'm not sure it will be clearer... > -- > Sebastian Huber, embedded brains GmbH > > Address : Dornierstr. 4, D-82178 Puchheim, Germany > Phone : +49 89 189 47 41-16 > Fax : +49 89 189 47 41-09 > E-Mail : [email protected] > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. >