This is the mail archive of the libc-alpha@sourceware.org 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: [PATCH COMMITTED] resolv: Compile without -Wno-write-strings


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?

zw


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