This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Stefan Liebler <stli at linux dot vnet dot ibm dot com>, GNU C Library <libc-alpha at sourceware dot org>, Libc-stable Mailing List <libc-stable at sourceware dot org>
- Date: Thu, 7 Sep 2017 10:38:04 -0700
- Subject: Re: Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.
- Authentication-results: sourceware.org; auth=none
- References: <8d30c0c3-0b00-fc08-8e49-811aec114ef9@linux.vnet.ibm.com> <878tpry1ce.fsf@linux-m68k.org> <4c0d8778-916b-43d4-3206-2653f3696390@linux.vnet.ibm.com> <20170224095709.GA4243@altlinux.org> <CAMe9rOqmd0sDjrNCoHeguu+qT5h2CwBB9VvK9wOuJu7EBqPH=A@mail.gmail.com>
H.J. Lu wrote:
-static const const char *domain = "www.example.com";
+static const char * const domain = "www.example.com";
Why not:
static const char domain[] = "www.example.com";
instead, before you backport? It's simpler and less confusing.