Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6038586ybi; Wed, 31 Jul 2019 07:22:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtpWcqJoqhoA1DmB9YXLYbgt+lxVn2sRxJbq8aTjaspylBLD8H1pp9HXJOMkADT0Ktik7u X-Received: by 2002:a63:484d:: with SMTP id x13mr113603264pgk.122.1564582973718; Wed, 31 Jul 2019 07:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564582973; cv=none; d=google.com; s=arc-20160816; b=CFejlgeN0FW963cIQLhuMo9la9kzgTpLmh7P1r6jkcM7Rucm137o3IQDi6YpJBd899 7XIjqGyimdFk/RmoxoK5kuk8nbwEoa82D9tCG8ROej0nAH1KPicUjsS4gXiMkTijTOt7 ZBb8mZCTbbSP1aIYg4tYaR6TAgzWnAZxX1BJG644ivuFyrkhNm+vOr+W6GW/6LfwSEa7 GUFqNSlTSYCnr4QEU7RgLT5naTSlFDzqkg5HuPCAKSA3YyDJkw+je3t0LooqZWBesM6y WH+bZfCSriq4u6MhS3gQpghSqhWZ6qnihx4P1iz5d4wTHoRWs1bw8l23sgXctiQ17v1k p+ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QinEdhda0QF80hZU/Agg8fmLabZy/oSbGrNclrokDBw=; b=fclhI+VdxA24NagXufbHVQh7A4UbF2W1DMfNvHu1x5147Juayc6VnjpKg464gipEum /KSS7JwG2gc3Bs9CNfApYXbA8I8MIMT5oI9bGw5wlG9278a9vvduNDW+O5s6r0DTUMzD OYZ8uF8CCxhJQxQIa8g6EermJnxjyJWpAvbfwJSkNxQpOD8uA5csJIhGkxGDGRfrjbsQ UKSbSLqyK6fEbuNsKg4RqI4ZPyxuaOTNHgCLEIzOKhFbwTaeJOKl/r1mgtR8Y8ROQ6uE C2FoUrGy8ihN3SFEyMcVtprXclzG479tUFT33fEpMFBlrGgQPrLX1+saigsx3Q9Yuxgt 3uQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=UNwu0c4w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj11si30757454plb.373.2019.07.31.07.22.38; Wed, 31 Jul 2019 07:22:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=UNwu0c4w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387617AbfGaM3c (ORCPT + 99 others); Wed, 31 Jul 2019 08:29:32 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:49476 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387594AbfGaM3c (ORCPT ); Wed, 31 Jul 2019 08:29:32 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6VCSffp017250; Wed, 31 Jul 2019 12:29:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=corp-2018-07-02; bh=QinEdhda0QF80hZU/Agg8fmLabZy/oSbGrNclrokDBw=; b=UNwu0c4wPTcK+P1xidV4FT1LKRMkQxaz1cUkvPP0Ee+M+UU7Gz6OFj/z0zrdjsIBiIq4 RR8DcnO5BwNTbkOvMba9ntx0ugykK37yx2s+Jx6DIgjqa48IZxcBXUaErA1PKGdhWr8G S8WWUkZgU4BlTabEqJIoeeOVWQGWLj0dAYvOkqC0FbbM0/OAXdFd2cjaI2oHoDA481B2 +wEqkrBjyxFUHotQBrap0c7q5fg3j/fm9XhJXH2VLylTe5PSkrLLX5CH1ijL6LQ1clmv z5rKCBCAVw8gaAgmgUgsyHemIMKZ2yOeJ8PUZZ2MFFIg2K8J4ASWSTjwi0sYZWoA5hKV vg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2u0e1tw392-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Jul 2019 12:29:04 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6VCRT7A074339; Wed, 31 Jul 2019 12:29:03 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2u2exbjc4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Jul 2019 12:29:03 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x6VCSwSp004011; Wed, 31 Jul 2019 12:28:58 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 31 Jul 2019 12:28:57 +0000 Date: Wed, 31 Jul 2019 15:28:41 +0300 From: Dan Carpenter To: =?iso-8859-1?Q?Aur=E9lien?= Aptel Cc: Colin King , samba-technical@lists.samba.org, Steve French , linux-cifs@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cifs: remove redundant assignment to variable rc Message-ID: <20190731122841.GA1974@kadam> References: <20190731090526.27245-1-colin.king@canonical.com> <87r266seg4.fsf@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87r266seg4.fsf@suse.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9334 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907310127 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9334 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907310127 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 31, 2019 at 12:09:31PM +0200, Aur?lien Aptel wrote: > Colin King writes: > > Variable rc is being initialized with a value that is never read > > and rc is being re-assigned a little later on. The assignment is > > redundant and hence can be removed. > > I think I would actually rather have rc set to an error by default than > uninitialized. Just my personal opinion. You're just turning off GCC's static analysis (and introducing false positives) when you do that. We have seen bugs caused by this and never seen any bugs prevented by this style. regards, dan carpenter