From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 9E8D73858D39; Wed, 17 Apr 2024 20:05:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E8D73858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713384354; bh=NerxeqSOHXoyHsJh1giXcCEsXnL+Ukyp0VantQJEskc=; h=From:To:Subject:Date:From; b=FE32lgN7XF/hqteJpjK1AolMt1i4HJYJ7KJtU3G9RciYRoZ08rGJrMySq5KjakS13 ErjayiMqpJj8zSnbf123oaTwQQQg9vKu59RpwKA9HzhU+GSncwDVzw+UQqx6Wj4vMp h+8m68orXJuddB55HBr+bfukZBmxyCoFLdqDKcJE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] elf: Suppress clang -Wstring-plus-int on rtld.c X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: d2161cbdbb438f7a167024e41711fb7775ef3fd1 X-Git-Newrev: 3d7304378bade0b52180deb08aeaecf9768b991b Message-Id: <20240417200554.9E8D73858D39@sourceware.org> Date: Wed, 17 Apr 2024 20:05:54 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3d7304378bade0b52180deb08aeaecf9768b991b commit 3d7304378bade0b52180deb08aeaecf9768b991b Author: Adhemerval Zanella Date: Thu Mar 10 09:48:32 2022 -0300 elf: Suppress clang -Wstring-plus-int on rtld.c clang issues an warning adding 'const unsigned char' to a string does not append to the string, however it is exactly what code means here. Diff: --- elf/rtld.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elf/rtld.c b/elf/rtld.c index d116a436f5..eacd406b68 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -2523,10 +2523,16 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy); _dl_printf ("\ Valid options for the LD_DEBUG environment variable are:\n\n"); + /* clang issues an warning adding 'const unsigned char' to a string + does not append to the string, however it is exactly what code + means here. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (16, "-Wstring-plus-int"); for (cnt = 0; cnt < ndebopts; ++cnt) _dl_printf (" %.*s%s%s\n", debopts[cnt].len, debopts[cnt].name, " " + debopts[cnt].len - 3, debopts[cnt].helptext); + DIAG_POP_NEEDS_COMMENT_CLANG; _dl_printf ("\n\ To direct the debugging output into a file instead of standard output\n\