Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3643471pxb; Mon, 1 Feb 2021 00:16:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMsgKyRxSg7+qZzJjkMKgXW9WeORxw/s0MzSjJvgps5YoC6rBRNay4+jknButrS6jT73PS X-Received: by 2002:a50:fb0e:: with SMTP id d14mr17556591edq.369.1612167396246; Mon, 01 Feb 2021 00:16:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612167396; cv=none; d=google.com; s=arc-20160816; b=aOwb6OSVywVM6XemVcOQFDMNFNOGXokyCuzS2cItG0r3j3W8GUBXaFG7cwChaRk387 40jE5k7gEH87YTwmNHhLTb5DoPDYTVuNANeI11pvXiRHMo4bQ+FrdJ1LO5RRqPAWWnIM HqCUYx8HBPpYK5J2qe1r8h7xibc9V9RMSxNDtjBwTO6vW0O+wdOzkTAaH5LsbvtO9GL+ AJuKEcQJV8hVcPlD3Z1YXJOZNokFKgDWmOsl3uWmkDty04eIzuQS197sBqovZIlfgdHb j1WDRI7U8MIM+I5vbcCdXYyMADNrCq1pPMiXBcVFUiKTROllG8Bi/gvIkdZ0xfIch4Zb 3C3g== 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=VNIJ9WUX7rn6Tm7fvKw29ufCldW1jH8PHt7Rdyw47dw=; b=JkGPdFHh2UfrENKTJs5s264LVSim6iRM8Ykw/usLmkVBYHPN2vGjCk1wGFOmuMS2qe C3rE5jeZNa5dgLqXmggNGkkOBYg9k5KGmPVkTFgYh8MfqMP7WWDbFXuif3wq2CybsHbB UBducWmIMUkuJGSs+TVryIBcu4hqHB2oIkw+D9ltV4tYpZ/DtQw49pHBm8VWBySIAlcx wDT4PJ04iuAVSH0fPSPjeQjPIZQvKcv7PGp06VT/w9EjtZ4lP5uFpZ7oCPwxMe2xgG7b FS7fq6I13ZzlqEX7RInxWVO0Yuj9vqKWXiCDF3reUE2HtCSlshchEMQIt0B4SsmX/Fg8 423w== 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 m5si2019002edv.157.2021.02.01.00.16.12; Mon, 01 Feb 2021 00:16:36 -0800 (PST) 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 S229629AbhBAIOG (ORCPT + 99 others); Mon, 1 Feb 2021 03:14:06 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:34637 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbhBAIOE (ORCPT ); Mon, 1 Feb 2021 03:14:04 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UNVd5Kb_1612167182; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UNVd5Kb_1612167182) by smtp.aliyun-inc.com(127.0.0.1); Mon, 01 Feb 2021 16:13:02 +0800 From: Yang Li To: keescook@chromium.org Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] gcc-plugins: Remove unneeded return variable Date: Mon, 1 Feb 2021 16:13:00 +0800 Message-Id: <1612167180-7136-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 This patch removes unneeded return variables, using only '0' instead. It fixes the following warning detected by coccinelle: ./scripts/gcc-plugins/structleak_plugin.c:173:14-17: Unneeded variable: "ret". Return "0" on line 203 Reported-by: Abaci Robot Signed-off-by: Yang Li --- 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 29b480c..d7190e4 100644 --- a/scripts/gcc-plugins/structleak_plugin.c +++ b/scripts/gcc-plugins/structleak_plugin.c @@ -170,7 +170,6 @@ static void initialize(tree var) static unsigned int structleak_execute(void) { basic_block bb; - unsigned int ret = 0; tree var; unsigned int i; @@ -200,7 +199,7 @@ static unsigned int structleak_execute(void) initialize(var); } - return ret; + return 0; } #define PASS_NAME structleak -- 1.8.3.1