This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.
- From: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 31 Jan 2017 08:39:42 +0100
- Subject: Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.
- Authentication-results: sourceware.org; auth=none
Hi,
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 one of the two const specifiers.
Ok to commit (after release)?
Bye.
Stefan
ChangeLog:
* resolv/tst-resolv-qtypes.c (domain):
Remove duplicate const qualifier.
commit 8967a533335bff0feaa2abae242de94c928c9214
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date: Mon Jan 30 09:06:44 2017 +0100
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 one of the two const specifiers.
ChangeLog:
* resolv/tst-resolv-qtypes.c (domain):
Remove duplicate const qualifier.
diff --git a/resolv/tst-resolv-qtypes.c b/resolv/tst-resolv-qtypes.c
index dcb39e5..2d91e92 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 *domain = "www.example.com";
static int
wrap_res_query (int type, unsigned char *answer, int answer_length)