Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1221982pxy; Thu, 6 May 2021 03:20:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpOTK5ZeAUTo1k/0remFOS8kevny98W2PnO5/t1tO8XBLvX3zm4MqONavoGEA8dKUe21kE X-Received: by 2002:a17:906:747:: with SMTP id z7mr3664677ejb.252.1620296450388; Thu, 06 May 2021 03:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620296450; cv=none; d=google.com; s=arc-20160816; b=kvO+vSbzDTzJEjNH0sPR63siwlenRCE9vyjfFHDkMkUONWOx2JaEruadU4QxafQDlk myNLEegomv2zC2LuHGrhctOqJRlnfWGbtUNOxaPhfNdad+kgO5444r4P0LyHVNY9IjG6 EaLmGQV4/kjpSFoD2L60VF90R12Er8fwbWt7XCliHM0fVquKKqg7ADP5TTmGEeWbjyP1 HPRtQ4QPnN+FRcC8OnQMnpYb+lFUahTjHfV7K2JohmTzCbyMXoE5jvR6or8Ruxzdfrzl Ps7ztlrO9zPFCqag4s8XDenHZeyjRTzRZaHA6zYHFC+xNbPnRfdnCjGmtjDFP7cZIyxg Sn9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=215VmHmVyv0knbkScsZDRdvAqzXxIcPNUJg+n7dv45c=; b=TyplwQWHW+uH2KCMBnmeq+mw78+6gzsYFMGyJlg5Qb6sPzU6GIi9aNhOOYdWT0Wed/ 63QN9tUo5YvBTsLz5Ecgyvhe00gOM3xyGfpQ9J/5wrCSlSUKfl/WAZ7DYHvFv2pWCTPp MaPQrxiG78MA8tu025oajx1yWDaXOPKZouBHNBSAKUz6X3253qHHKYSnm3xbxNoIcMQ/ q4yBKrMJzTt7gmPv51xtjYFkkvPQh9QhedFDrk66AW5Rx4ZffOn5vAvmCbuOZymNZIcj JttCszgXuvJJ8+TGajIHb5SNly5UM0wTZhS2CU5e9BQSVO5zGgLXq3+EEA8n4cHOvYvg WYJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si533812edm.517.2021.05.06.03.20.26; Thu, 06 May 2021 03:20:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232936AbhEFKTd (ORCPT + 99 others); Thu, 6 May 2021 06:19:33 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:50885 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234210AbhEFKTY (ORCPT ); Thu, 6 May 2021 06:19:24 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R531e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UXyJDp1_1620296302; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UXyJDp1_1620296302) by smtp.aliyun-inc.com(127.0.0.1); Thu, 06 May 2021 18:18:23 +0800 From: Yang Li To: nathan@kernel.org Cc: ndesaulniers@google.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] lib/asn1_encoder: Remove redundant assignment to ret Date: Thu, 6 May 2021 18:18:19 +0800 Message-Id: <1620296299-125105-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable 'ret' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: lib/asn1_encoder.c:167:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- lib/asn1_encoder.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/asn1_encoder.c b/lib/asn1_encoder.c index 41e71aa..0d287ea 100644 --- a/lib/asn1_encoder.c +++ b/lib/asn1_encoder.c @@ -164,8 +164,6 @@ static int asn1_encode_oid_digit(unsigned char **_data, int *data_len, u32 oid) data_len -= 3; - ret = 0; - for (i = 2; i < oid_len; i++) { ret = asn1_encode_oid_digit(&d, &data_len, oid[i]); if (ret < 0) -- 1.8.3.1