From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44795 invoked by alias); 11 Oct 2016 16:56:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 44771 invoked by uid 89); 11 Oct 2016 16:56:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=zack X-HELO: mx1.redhat.com Subject: Re: [PATCH COMMITTED] resolv: Compile without -Wno-write-strings To: Zack Weinberg References: <20161011135022.1A7EE439942EF@oldenburg.str.redhat.com> Cc: GNU C Library From: Florian Weimer Message-ID: <26fae5dc-922b-f134-d038-8a629e616061@redhat.com> Date: Tue, 11 Oct 2016 16:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-10/txt/msg00208.txt.bz2 On 10/11/2016 06:52 PM, Zack Weinberg wrote: > On Tue, Oct 11, 2016 at 9:50 AM, Florian Weimer wrote: >> extern const struct res_sym __p_class_syms[]; >> libresolv_hidden_proto (__p_class_syms) >> const struct res_sym __p_class_syms[] = { >> - {C_IN, "IN"}, >> - {C_CHAOS, "CHAOS"}, >> - {C_HS, "HS"}, >> - {C_HS, "HESIOD"}, >> - {C_ANY, "ANY"}, >> - {C_NONE, "NONE"}, >> - {C_IN, (char *)0} >> + {C_IN, (char *) "IN"}, >> + {C_CHAOS, (char *) "CHAOS"}, >> + {C_HS, (char *) "HS"}, >> + {C_HS, (char *) "HESIOD"}, >> + {C_ANY, (char *) "ANY"}, >> + {C_NONE, (char *) "NONE"}, >> + {C_IN, NULL, NULL} > > As these (appear to be) internal symbols, why can't we make `struct > res_sym` const-correct instead of adding all these casts? __p_class_syms and __p_types_syms are public symbols. struct res_sym comes from an installed header file. I didn't want to change its definition just yet. Thanks, Florian