From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id D054B3857836; Tue, 28 Jun 2022 08:44:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D054B3857836 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] elf: Fix -DNDEBUG warning in _dl_start_args_adjust X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: 5e89ed42fd8997414732525c9460878d65363b3f X-Git-Newrev: c1ada668a381e122ee37cb8be7f0637111f63ea7 Message-Id: <20220628084447.D054B3857836@sourceware.org> Date: Tue, 28 Jun 2022 08:44:47 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 08:44:48 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c1ada668a381e122ee37cb8be7f0637111f63ea7 commit c1ada668a381e122ee37cb8be7f0637111f63ea7 Author: Florian Weimer Date: Tue Jun 28 10:40:16 2022 +0200 elf: Fix -DNDEBUG warning in _dl_start_args_adjust This is another blocker for building glibc with the default -Werror setting and -DNDEBUG. Diff: --- elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elf/rtld.c b/elf/rtld.c index f5a3d1968f..cbbaf4a331 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1307,7 +1307,7 @@ _dl_start_args_adjust (int skip_args) return; /* Sanity check. */ - intptr_t argc = (intptr_t) sp[0] - skip_args; + intptr_t argc __attribute__ ((unused)) = (intptr_t) sp[0] - skip_args; assert (argc == _dl_argc); /* Adjust argc on stack. */