This is the mail archive of the
mailing list for the glibc project.
Re: search locale archive again after alias expansion
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Thu, 26 Feb 2015 16:44:17 -0500
- Subject: Re: search locale archive again after alias expansion
- Authentication-results: sourceware.org; auth=none
- References: <orr4dao5h6 dot fsf at livre dot home> <20130918220004 dot B23492C09F at topped-with-meat dot com> <ory56t31yv dot fsf at livre dot home> <or8uigyac8 dot fsf at free dot home> <oregr8db48 dot fsf at livre dot home> <54E796D1 dot 40502 at redhat dot com> <oregpd19rz dot fsf at livre dot home>
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
> 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.