]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Fri, 24 Feb 2017 12:30:13 +0000 (13:30 +0100)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Fri, 24 Feb 2017 12:30:13 +0000 (13:30 +0100)
Compiling resolv/tst-resolv-qtypes.c with GCC 7 results in:
tst-resolv-qtypes.c:53:14: error: duplicate â€˜const’ declaration specifier [-Werror=duplicate-decl-specifier]
 static const const char *domain = "www.example.com";

This patch removes the duplicate const and makes domain a const pointer
to const char literal.

ChangeLog:

* resolv/tst-resolv-qtypes.c (domain):
Change type to const pointer to const char.

ChangeLog
resolv/tst-resolv-qtypes.c

index da57aba27c592f3cc485daaaf4e410e56e055b59..2734e30064cd72dbf36ccd4210c868ef6b2f42c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-24  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * resolv/tst-resolv-qtypes.c (domain):
+       Change type to const pointer to const char.
+
 2017-02-24  Joseph Myers  <joseph@codesourcery.com>
 
        * math/Makefile (libm-tests-generated): Remove variable.
index dcb39e505ed84d27c8ce923cf962d5877dbc1ff0..06ea3dbd1463ef60265cbd17d02f1a055107b468 100644 (file)
@@ -50,7 +50,7 @@ response (const struct resolv_response_context *ctx,
   resolv_response_close_record (b);
 }
 
-static const const char *domain = "www.example.com";
+static const char * const domain = "www.example.com";
 
 static int
 wrap_res_query (int type, unsigned char *answer, int answer_length)