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]

Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.


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)

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