Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1400987ybz; Fri, 17 Apr 2020 23:44:37 -0700 (PDT) X-Google-Smtp-Source: APiQypJH/gRcSJwFNfs61IvC1bveJKQ8y0M8M+wAvfMjs7VXW82o1qd/55LduXAwrjKfn6Wifg0N X-Received: by 2002:a17:906:54cd:: with SMTP id c13mr6315501ejp.307.1587192277136; Fri, 17 Apr 2020 23:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587192277; cv=none; d=google.com; s=arc-20160816; b=fAalbnG8U6rwCUVz0AH6dDXiWUfMRQ7fp8VkKmC/PIAwDABc46eLcZp/+N6R5kkJPr bFWLaLX1AWc2qcwAmDI0P3jOfgfQlM+r5gGVnGBf/Xot0fU8sGISrA49Vt8aF/+P16O2 bbqtgMRVsqvCvhzZLNPJSxu0lNDmmikbFoe0EtGZyvJvC0TAiPteg0Bwrb+PblMPfDyI ItIi7W3mSc2Im9J3qjtABdiqZveNJx3q5ABee1Wj8F71pJxVE7hCCeMbl7Lv+gVe+aXf jjUFnpuhIpKO4TUD3n71wv3YkK6asvgl9lK+CLS1e2h9+Ro+aYuSzLqTML+LEwk+oKT5 U82Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=RC1MbQaCeye+5b4K6/cYG0oWiZA9cY0vBpLGYVelRvA=; b=YopOJF6X9y4NA9uFWe7aAE214TuAp46tReHSQeg7S9y96z1udSnQx4N8OkUuxCmT8s m6oZgBXLJ6vFLc2f0kzp8j1vGc61ziTktpH+r+eKY98RBwSPExZ74Ub1ybSH/9YPGPx0 +87Y9+jOAlOxwmjpn5xzVsI5cl64l0COZDrszUetgQzRrNwq4NXJVc4/HakxfNcCB5r9 V87s990x1TbflFVFJT/aBNXsFfy+XEBk2CYxk/C6pyRI0m7vEgtSAyb+BSDk20HMT5vw 9nx89UyHleNnJd4RzYHRnQUnGCMjTsXpu/GUqwYx0JD0YyTmsoyFHFX3WNCC3KL1G9vH N7Og== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv13si9005018ejb.115.2020.04.17.23.44.14; Fri, 17 Apr 2020 23:44:37 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725939AbgDRGiy (ORCPT + 99 others); Sat, 18 Apr 2020 02:38:54 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2404 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725782AbgDRGiy (ORCPT ); Sat, 18 Apr 2020 02:38:54 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5F4D33666557344A2AD2; Sat, 18 Apr 2020 14:38:48 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Sat, 18 Apr 2020 14:38:40 +0800 From: Jason Yan To: , , , CC: Jason Yan , Hulk Robot Subject: [PATCH] gcc-plugins: structleak: remove unneeded variable 'ret' Date: Sat, 18 Apr 2020 15:05:05 +0800 Message-ID: <20200418070505.10715-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: scripts/gcc-plugins/structleak_plugin.c:177:14-17: Unneeded variable: "ret". Return "0" on line 207 Reported-by: Hulk Robot Signed-off-by: Jason Yan --- scripts/gcc-plugins/structleak_plugin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/gcc-plugins/structleak_plugin.c b/scripts/gcc-plugins/structleak_plugin.c index e89be8f5c859..fdff6278eda0 100644 --- a/scripts/gcc-plugins/structleak_plugin.c +++ b/scripts/gcc-plugins/structleak_plugin.c @@ -174,7 +174,6 @@ static void initialize(tree var) static unsigned int structleak_execute(void) { basic_block bb; - unsigned int ret = 0; tree var; unsigned int i; @@ -204,7 +203,7 @@ static unsigned int structleak_execute(void) initialize(var); } - return ret; + return 0; } #define PASS_NAME structleak -- 2.21.1