about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2017-02-24 13:30:13 +0100
committerStefan Liebler <stli@linux.vnet.ibm.com>2017-02-24 13:30:13 +0100
commitd4f94368a96541db2b38b6535402a941f5aff975 (patch)
tree7443cf5be42b4930b3c640d69730414704bd6879
parent92061bb033f093cca76e31745cac14c43a1fb29b (diff)
downloadglibc-d4f94368a96541db2b38b6535402a941f5aff975.tar.gz
glibc-d4f94368a96541db2b38b6535402a941f5aff975.tar.xz
glibc-d4f94368a96541db2b38b6535402a941f5aff975.zip
Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.
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.
-rw-r--r--ChangeLog5
-rw-r--r--resolv/tst-resolv-qtypes.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index da57aba27c..2734e30064 100644
--- 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.
diff --git a/resolv/tst-resolv-qtypes.c b/resolv/tst-resolv-qtypes.c
index dcb39e505e..06ea3dbd14 100644
--- a/resolv/tst-resolv-qtypes.c
+++ b/resolv/tst-resolv-qtypes.c
@@ -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)