From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92988C433E1 for ; Tue, 28 Jul 2020 04:34:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 66538206D7 for ; Tue, 28 Jul 2020 04:34:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="MJRLDRD9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726047AbgG1Eeb (ORCPT ); Tue, 28 Jul 2020 00:34:31 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:53422 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbgG1Eea (ORCPT ); Tue, 28 Jul 2020 00:34:30 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06S4RfwB052656 for ; Tue, 28 Jul 2020 04:34:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2020-01-29; bh=spEo3D731rWLi814GfJbRungW6cZLK9E2bTaGZBcX28=; b=MJRLDRD9cTEH6mirZuWksArk0cU9hKjEy6MO1M/GetMi7ZCTyB8wIvAjfkIGbcI3myje 8olcsXrSq7mRF3l81PXW13x1J3ORQI2VMI31PLBL+yjgmLYGSiYKwF7rqQl9FsW03lQf Ne1aoPkGaSPMD0RFXYXm8FV4xz9gnbUITqHziPOSHU8JxDEVwqTB9jBStPQShdtTjt5D Y50PaetnWoCKURzQ6ST9hoDjgUKUKPHwP6tb7CDbRxYEKQkkYIozydotxM7oGJlucmCl gG6bsKH/AerU4R+imhmVvWMcSfBCT96pvuDkuGqpRGsl3set0rvpuApdlKaT7x2vY+BJ VA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 32hu1j53ms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 28 Jul 2020 04:34:29 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06S4SOWH161295 for ; Tue, 28 Jul 2020 04:32:29 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 32hu5snf28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 28 Jul 2020 04:32:29 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06S4WSdG024379 for ; Tue, 28 Jul 2020 04:32:28 GMT Received: from localhost.localdomain (/67.1.142.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 27 Jul 2020 21:32:27 -0700 From: Allison Collins To: linux-xfs@vger.kernel.org Subject: [PATCH v4 2/2] xfs: Fix compiler warning in xfs_attr_shortform_add Date: Mon, 27 Jul 2020 21:32:20 -0700 Message-Id: <20200728043220.17231-3-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200728043220.17231-1-allison.henderson@oracle.com> References: <20200728043220.17231-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9695 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 adultscore=0 bulkscore=0 malwarescore=0 mlxscore=0 spamscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007280032 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9695 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxscore=0 impostorscore=0 phishscore=0 adultscore=0 suspectscore=1 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007280032 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Fix compiler warning warning: variable 'error' set but not used in xfs_attr_shortform_add. Reported-by: kernel test robot Signed-off-by: Allison Collins --- fs/xfs/libxfs/xfs_attr_leaf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c index ad7b351..8623c81 100644 --- a/fs/xfs/libxfs/xfs_attr_leaf.c +++ b/fs/xfs/libxfs/xfs_attr_leaf.c @@ -715,7 +715,7 @@ xfs_attr_shortform_add( { struct xfs_attr_shortform *sf; struct xfs_attr_sf_entry *sfe; - int offset, size, error; + int offset, size; struct xfs_mount *mp; struct xfs_inode *dp; struct xfs_ifork *ifp; @@ -729,8 +729,8 @@ xfs_attr_shortform_add( ifp = dp->i_afp; ASSERT(ifp->if_flags & XFS_IFINLINE); sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data; - error = xfs_attr_sf_findname(args, &sfe, NULL); - ASSERT(error != -EEXIST); + if (xfs_attr_sf_findname(args, &sfe, NULL) == -EEXIST) + ASSERT(0); offset = (char *)sfe - (char *)sf; size = XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen); -- 2.7.4