From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FE3342D72; Tue, 27 Jun 2023 15:45:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2976640F18; Tue, 27 Jun 2023 15:45:30 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 64C2C40EE1 for ; Tue, 27 Jun 2023 15:45:29 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C66C55C0216; Tue, 27 Jun 2023 09:45:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 27 Jun 2023 09:45:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1687873528; x=1687959928; bh=rjBlnEfay6IoTjst3PT4ZjPrjAAMCPTxAXm CJFNsVVU=; b=Xkv/bCi83tPbU2yVEKKxaH5KgNkFdQnFDbEYiJdXWFOVYCKYK9C zO2uJZD/zqmv7xqYGBPgj72V67QDMWH9qSHx3bJtR2ijKzaKh9bHOKhh+zsZf+KD u83+66hr660Tge29QqNFNfo3V9o02KMY5k2c+OhgTzIc+rykFbj9VfEAcKsei185 IdbqQjSMTERhQABwhhqCLR/0D3zQmFpdhmGTGxSHNkxbZUs/MTCi9lZW75LiqLge g8DhLiRMX2TU4y0NNFenYNgkvUi+Ow8M8m7b6ulFFxBeTmWXoStrc/7gSZ4g2FDL +6M9I0w9MtuklYLW54uejxxVkm0fP2T0KwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1687873528; x=1687959928; bh=rjBlnEfay6IoTjst3PT4ZjPrjAAMCPTxAXm CJFNsVVU=; b=HUv+s47Z+d9ANr3if9ZV6DAYjgsAC42qeRNzgnS8lp2fxSDXUAc r8wZctYoDIXuK6h+6vHN4jpYODxtSmUol6BQSctxmdB6e2DboTgCS1kkB0CuPLgT OiEWens7H+1/SwuEC0dwYCyKVuql81H/K/QiMjfW9gB82GQXUurm0VrZH22SvBMh WzsUct5m3sTrXazs/RttqMCoRrrBQacz08McfcVQyBfsbEdkxNp575TNMtn4qTta Bs/ctJef25HCoRpxhvDGQ2zH4TqvpI/eulELI3Gwv8Kt/F14/3CWjx0VVkID2ZYM /Djq7W/g2x3vMQ0ABsrjaaeMWr+cR8NUg9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtddtgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Jun 2023 09:45:27 -0400 (EDT) From: Thomas Monjalon To: Amit Prakash Shukla Cc: Nithin Dabilpuram , Pavan Nikhilesh , dev@dpdk.org, jerinj@marvell.com Subject: Re: [PATCH] lib: fix coverity for unused variable Date: Tue, 27 Jun 2023 15:45:26 +0200 Message-ID: <2509685.TLnPLrj5Ze@thomas> In-Reply-To: <20230616110640.3642684-1-amitprakashs@marvell.com> References: <20230616110640.3642684-1-amitprakashs@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 16/06/2023 13:06, Amit Prakash Shukla: > Removed variable "rc" that stored a return value from a function > rte_lpm6_lookup_bulk_func. You are not really removing the variable, right? It looks you just stop storing the return of this function. Whouldn't it better to check the return code? > Coverity issue: 385595 > Fixes: 20365d793e45 ("node: add IPv6 lookup node") > > Signed-off-by: Amit Prakash Shukla > --- > lib/node/ip6_lookup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/node/ip6_lookup.c b/lib/node/ip6_lookup.c > index e4bbc7ed67..2b20194295 100644 > --- a/lib/node/ip6_lookup.c > +++ b/lib/node/ip6_lookup.c > @@ -135,7 +135,7 @@ ip6_lookup_node_process_scalar(struct rte_graph *graph, struct rte_node *node, > node_mbuf_priv1(mbuf3, dyn)->ttl = ipv6_hdr->hop_limits; > rte_memcpy(ip_batch[3], ipv6_hdr->dst_addr, 16); > > - rc = rte_lpm6_lookup_bulk_func(lpm6, ip_batch, next_hop, 4); > + rte_lpm6_lookup_bulk_func(lpm6, ip_batch, next_hop, 4); > > next_hop[0] = (next_hop[0] < 0) ? (int32_t)drop_nh : next_hop[0]; > node_mbuf_priv1(mbuf0, dyn)->nh = (uint16_t)next_hop[0]; >