This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: search locale archive again after alias expansion

On 02/26/2015 01:12 AM, Alexandre Oliva wrote:
> Here's a follow-up patch that gets us rid of all the const-casting in
> loc_name and *name.  This ensures we won't write to stuff that should be
> const by accident, and avoids unsafely dereferencing pointers to
> pointers.
> Ok to install?
Not OK, please make the patch minimal.
> for  ChangeLog
> 	[BZ #15969]
> 	* locale/findlocale.c (_nl_find_locale): Introduce const
> 	version of loc_name and drop unsafe type casts.

The name change from loc_name to cloc_name makes backports to release
branches difficult as any patches applying on top of this one will
require this patch also.

Please checkin a minimal patch that simply changes the type to const
and fixes the warning.

OK to checkin a minimal patch.

Stylistically speaking we don't normally encode the const-ness into
the name of the variable, leaving that up to the compiler and linker/loader
to enforce as you try to write to that variable e.g. warnings or failures
as you try to write to RO-data.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]