[PATCH COMMITTED] resolv: Compile without -Wno-write-strings
Florian Weimer
fweimer@redhat.com
Tue Oct 11 16:56:00 GMT 2016
On 10/11/2016 06:52 PM, Zack Weinberg wrote:
> On Tue, Oct 11, 2016 at 9:50 AM, Florian Weimer <fweimer@redhat.com> 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
More information about the Libc-alpha
mailing list