From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 597F2A0096 for ; Mon, 3 Jun 2019 22:46:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3A8761B9B9; Mon, 3 Jun 2019 22:46:58 +0200 (CEST) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 1092B1B9A7 for ; Mon, 3 Jun 2019 22:46:56 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 461D6A78; Mon, 3 Jun 2019 13:46:55 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 08D9B3F246; Mon, 3 Jun 2019 13:46:54 -0700 (PDT) From: Honnappa Nagarahalli To: honnappa.nagarahalli@arm.com, dev@dpdk.org Cc: nd@arm.com Date: Mon, 3 Jun 2019 15:46:45 -0500 Message-Id: <20190603204645.24401-1-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] rcu: change format specifier in fprintf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use %u to fix argument type mismatch in fprintf. Coverity issue: 340074 Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism") Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang --- This patch is dependent on: http://patchwork.dpdk.org/patch/53455 lib/librte_rcu/rte_rcu_qsbr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_rcu/rte_rcu_qsbr.c b/lib/librte_rcu/rte_rcu_qsbr.c index b4ed01045..de2546464 100644 --- a/lib/librte_rcu/rte_rcu_qsbr.c +++ b/lib/librte_rcu/rte_rcu_qsbr.c @@ -234,7 +234,7 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v) id = i << __RTE_QSBR_THRID_INDEX_SHIFT; while (bmap) { t = __builtin_ctzl(bmap); - fprintf(f, "%d ", id + t); + fprintf(f, "%u ", id + t); bmap &= ~(1UL << t); } @@ -252,7 +252,7 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v) id = i << __RTE_QSBR_THRID_INDEX_SHIFT; while (bmap) { t = __builtin_ctzl(bmap); - fprintf(f, "thread ID = %d, count = %"PRIu64", lock count = %u\n", + fprintf(f, "thread ID = %u, count = %"PRIu64", lock count = %u\n", id + t, __atomic_load_n( &v->qsbr_cnt[id + t].cnt, -- 2.17.1