Re: Cast "const char *" pointers to "char *" to avoid compiler warnings.
Sebastian Huber <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
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. -- 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.