From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 6F1F93858434; Wed, 7 Feb 2024 14:05:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F1F93858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707314731; bh=8FdmSBi8nHR30g8auQbUJ1W3TVNA98uCvk3vqxpOUtE=; h=From:To:Subject:Date:From; b=nDY2H21KrnPWuOSyWyaHiqI/6Y7In+lzrfOty4BCnWrPorj1HXf2tUTt+913QtEWd Zp9XOMpE9OBmC63Dneth5rNb+OnxFTnI4IFfaUnvC6IkE/Qwz8YYrCNod0GOGtZBgL VCSHEF1JfzP8mg6clGVZ8evhlG65Po6gBmN6t6f8= 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: f0b0dcbddee324ceb556097f66f0380c06f77451 X-Git-Newrev: 8f0d151e0e741008589ff2b651b107ca1e0701fb Message-Id: <20240207140531.6F1F93858434@sourceware.org> Date: Wed, 7 Feb 2024 14:05:31 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f0d151e0e741008589ff2b651b107ca1e0701fb commit 8f0d151e0e741008589ff2b651b107ca1e0701fb 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 ac4bb23652..7d32de9588 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -2520,10 +2520,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\