From patchwork Tue Aug 13 14:21:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 11092337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8066D112C for ; Tue, 13 Aug 2019 14:23:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DEB227CEE for ; Tue, 13 Aug 2019 14:23:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E70E2860C; Tue, 13 Aug 2019 14:23:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA07027CEE for ; Tue, 13 Aug 2019 14:23:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxXgC-00010U-IW; Tue, 13 Aug 2019 14:21:40 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxXgA-00010P-UM for xen-devel@lists.xenproject.org; Tue, 13 Aug 2019 14:21:38 +0000 X-Inumbo-ID: a8aeecce-bdd5-11e9-aafe-fb24cb3e9b9f Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a8aeecce-bdd5-11e9-aafe-fb24cb3e9b9f; Tue, 13 Aug 2019 14:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1565706097; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=t5/h+6Ej+TC8Zr6OBX3eJkOkppP45klkWsjKMFGsuOg=; b=CCyZ4V12kHoYL8LaYNT/IYrsu0HAfbxokwXinzQ8Sdc/OJBlg2cC6S0H ZSfXYd1TxuV018hI6z2IynUn+SE0cPwaCY6He818SvdX5wBY/nEP0Pc4N TpQIHgo2kMvZiMtW4VN4yXUotRFxDkICtpDEzKG68t4Ls6BCpvt0WGvEl M=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: C/s2QiV6b5tHjj+MLy7u+4Gy74glFwMsn0dP5CnSgrBlBDAyvREkt2PfnWpQYXYITRunK2Tvsq SwazN5AzKq/f7UE2RUv6vImsXXOrbe+BS3ym4dQFEiq/honI3XpNcG0zaD12AgPyME6ojwmcDf vJN71kQkUagAEb6oIoV5M1Oos32U7MB45jiBOfxvoVpX+JaqAAOi30lLUb4VCk7UTjGJ8B0w42 wGwmaxO5mgwQ0RtKPZsJ4x5FasTPQTQtrIQbBPiC4TD2yvN1to+5QjtNAa7Qn1z8eRELhOr7Ro glw= X-SBRS: 2.7 X-MesageID: 4218879 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,381,1559534400"; d="scan'208";a="4218879" From: Andrew Cooper To: Xen-devel Date: Tue, 13 Aug 2019 15:21:28 +0100 Message-ID: <20190813142128.18551-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190813135211.13668-1-andrew.cooper3@citrix.com> References: <20190813135211.13668-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 2/1] toos/xenstat: Fix -Wunused-function issue X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP When compiling xenstat with -Werror, Clang complains: src/xenstat.c:134:34: error: unused function 'parse' [-Werror,-Wunused-function] static inline unsigned long long parse(char *s, char *match) ^ 1 error generated. Drop the function. It really is unused. Spotted by Travis-CI. Signed-off-by: Andrew Cooper Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu --- tools/xenstat/libxenstat/src/xenstat.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c index bba143eb53..6f93d4e982 100644 --- a/tools/xenstat/libxenstat/src/xenstat.c +++ b/tools/xenstat/libxenstat/src/xenstat.c @@ -131,20 +131,6 @@ void xenstat_uninit(xenstat_handle * handle) } } -static inline unsigned long long parse(char *s, char *match) -{ - char *s1 = strstr(s,match); - unsigned long long ret; - - if ( s1 == NULL ) - return 0LL; - s1 += 2; - if ( *s1++ != ':' ) - return 0LL; - sscanf(s1,"%llu",&ret); - return ret; -} - xenstat_node *xenstat_get_node(xenstat_handle * handle, unsigned int flags) { #define DOMAIN_CHUNK_SIZE 256