From patchwork Tue Oct 5 15:36:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan-Benedict Glaw X-Patchwork-Id: 45900 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7D212385C400 for ; Tue, 5 Oct 2021 15:37:15 +0000 (GMT) X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from lug-owl.de (lug-owl.de [188.68.32.151]) by sourceware.org (Postfix) with ESMTP id 0DCD53857017 for ; Tue, 5 Oct 2021 15:36:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0DCD53857017 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id 9004841F17; Tue, 5 Oct 2021 17:36:40 +0200 (CEST) Date: Tue, 5 Oct 2021 17:36:40 +0200 From: Jan-Benedict Glaw To: elfutils-devel@sourceware.org Subject: [PATCH] Tests: Fix warning in show-die-info.c Message-ID: <20211005153640.brpi3yyvmjxtovbh@lug-owl.de> MIME-Version: 1.0 Content-Disposition: inline X-Operating-System: Linux chamaeleon 5.8.0-0.bpo.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" Hi! My last email had a wrong subject, though the patch was correct. Here's a second patch, this time *actally* for tests/show-die-info.c: Please keep me Cc'ed as I'm not subscribed! Thanks, Jan-Benedict diff --git a/tests/show-die-info.c b/tests/show-die-info.c index 34e27a3b..0823cc60 100644 --- a/tests/show-die-info.c +++ b/tests/show-die-info.c @@ -97,7 +97,7 @@ handle (Dwarf *dbg, Dwarf_Die *die, int n) printf ("%*s Attrs :", n * 5, ""); for (cnt = 0; cnt < 0xffff; ++cnt) if (dwarf_hasattr (die, cnt)) - printf (" %s", dwarf_attr_string (cnt)); + printf (" %s", (dwarf_attr_string (cnt)? dwarf_attr_string (cnt): "")); puts (""); if (dwarf_hasattr (die, DW_AT_low_pc) && dwarf_lowpc (die, &addr) == 0)