From patchwork Tue Sep 22 12:16:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 1369031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=kalray.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=Yiavp3j6; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BwgLC6Nmhz9sTH for ; Tue, 22 Sep 2020 22:17:37 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 163F5102E7; Tue, 22 Sep 2020 14:17:22 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mib.mailinblack.com (mib.mailinblack.com [185.7.73.95]) by helium.openadk.org (Postfix) with ESMTPS id 7482210159 for ; Tue, 22 Sep 2020 14:17:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mib.mailinblack.com (Postfix) with ESMTP id 20345328DF7 for ; Tue, 22 Sep 2020 12:17:18 +0000 (UTC) Received: from mib.mailinblack.com (localhost [127.0.0.1]) by mib.mailinblack.com with SMTP (Mib Daemon ) id KFDXBFLH for devel@uclibc-ng.org; Tue, 22 Sep 2020 12:17:18 +0000 (UTC) Received: from zimbra2.kalray.eu (zimbra2.kalray.eu [92.103.151.219]) by mib.mailinblack.com (Postfix) with ESMTPS id E0F9C328D9F for ; Tue, 22 Sep 2020 12:17:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id ACF6E27E1073 for ; Tue, 22 Sep 2020 14:17:17 +0200 (CEST) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id s9sPi-FGzQ3o; Tue, 22 Sep 2020 14:17:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 0491227E105F; Tue, 22 Sep 2020 14:17:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 0491227E105F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1600777037; bh=VAN94+jx9d2lhTm5Ns+qHrtLOUvHpmd+spHjDT4B6JQ=; h=From:To:Date:Message-Id; b=Yiavp3j6fDCxDd+i4kQsuFgKBqAjmWi3I96BIGcIVu/D2NYW06Hm3LFquavVYiXf+ LODTL4ujYgy11IVZ+4a03Msz2a72HpK+wUl9ovth/9L8D8nmMCshICkzdPjnyuI4IL qwgYYUpuFWlMHnJLN8h+SvlXBONAE/o5XAHF4GPU= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FwN0Wx_ezTGr; Tue, 22 Sep 2020 14:17:16 +0200 (CEST) Received: from junon.lin.mbt.kalray.eu (unknown [192.168.37.161]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id DC0A227E102A; Tue, 22 Sep 2020 14:17:16 +0200 (CEST) From: Yann Sionneau To: devel@uclibc-ng.org Date: Tue, 22 Sep 2020 14:16:58 +0200 Message-Id: <20200922121703.12838-2-ysionneau@kalray.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200922121703.12838-1-ysionneau@kalray.eu> References: <20200922121703.12838-1-ysionneau@kalray.eu> Subject: [uclibc-ng-devel] [PATCH 1/6] Fix unused variable warning in dl-startup.c X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" SEND_STDERR_DEBUG does nothing if __SUPPORT_LD_DEBUG_EARLY__ is not defined thus causing a warning. Fixes this: In file included from ldso/ldso/ldso.c:86:0: ldso/ldso/dl-startup.c: In function '_dl_start': ldso/ldso/dl-startup.c:313:13: warning: variable 'strtab' set but not used [-Wunused-but-set-variable] char *strtab; ^~~~~~ Signed-off-by: Yann Sionneau --- ldso/ldso/dl-startup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c index 1b559a855..24b046c62 100644 --- a/ldso/ldso/dl-startup.c +++ b/ldso/ldso/dl-startup.c @@ -310,11 +310,13 @@ DL_START(unsigned long args) symbol_addr = 0; sym = NULL; if (symtab_index) { - char *strtab; ElfW(Sym) *symtab; +#if !defined(EARLY_STDERR_SPECIAL) && defined(__SUPPORT_LD_DEBUG_EARLY__) + char *strtab; + strtab = (char *) tpnt->dynamic_info[DT_STRTAB]; +#endif symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB]; - strtab = (char *) tpnt->dynamic_info[DT_STRTAB]; sym = &symtab[symtab_index]; symbol_addr = (unsigned long) DL_RELOC_ADDR(load_addr, sym->st_value); #if !defined(EARLY_STDERR_SPECIAL)