From nobody Tue Feb 10 20:28:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530278551920440.18665463065065; Fri, 29 Jun 2018 06:22:31 -0700 (PDT) Received: from localhost ([::1]:42104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYtM7-0005BC-9Q for importer@patchew.org; Fri, 29 Jun 2018 09:22:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYtKl-0004Xh-8s for qemu-devel@nongnu.org; Fri, 29 Jun 2018 09:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYtKh-0007lM-CF for qemu-devel@nongnu.org; Fri, 29 Jun 2018 09:21:07 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYtKh-0007hi-3o for qemu-devel@nongnu.org; Fri, 29 Jun 2018 09:21:03 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5TDIkSA027862 for ; Fri, 29 Jun 2018 09:21:01 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jwms2jfud-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 29 Jun 2018 09:21:01 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 29 Jun 2018 14:20:59 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 29 Jun 2018 14:20:57 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5TDKuF041812202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 29 Jun 2018 13:20:56 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 027E9AE04D; Fri, 29 Jun 2018 14:20:48 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED909AE045; Fri, 29 Jun 2018 14:20:47 +0100 (BST) Received: from smtp.lab.toulouse-stg.fr.ibm.com (unknown [9.101.4.1]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 29 Jun 2018 14:20:47 +0100 (BST) Received: from bahia.lan (icon-9-164-191-207.megacenter.de.ibm.com [9.164.191.207]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id 2C2C822018B; Fri, 29 Jun 2018 15:20:56 +0200 (CEST) From: Greg Kurz To: qemu-devel@nongnu.org Date: Fri, 29 Jun 2018 15:20:45 +0200 X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180629132045.429006-1-groug@kaod.org> References: <20180629132045.429006-1-groug@kaod.org> X-TM-AS-GCONF: 00 x-cbid: 18062913-0028-0000-0000-000002D6649F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062913-0029-0000-0000-0000238DD620 Message-Id: <20180629132045.429006-3-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-29_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=4 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=652 adultscore=4 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806290143 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PULL 2/2] 9p: darwin: Explicitly cast comparisons of mode_t with -1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Keno Fischer , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Keno Fischer Comparisons of mode_t with -1 require an explicit cast, since mode_t is unsigned on Darwin. Signed-off-by: Keno Fischer Signed-off-by: Greg Kurz --- hw/9pfs/9p-local.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 828e8d6e5638..c30f4f26bd68 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -308,7 +308,7 @@ update_map_file: if (credp->fc_gid !=3D -1) { gid =3D credp->fc_gid; } - if (credp->fc_mode !=3D -1) { + if (credp->fc_mode !=3D (mode_t)-1) { mode =3D credp->fc_mode; } if (credp->fc_rdev !=3D -1) { @@ -414,7 +414,7 @@ static int local_set_xattrat(int dirfd, const char *pat= h, FsCred *credp) return err; } } - if (credp->fc_mode !=3D -1) { + if (credp->fc_mode !=3D (mode_t)-1) { uint32_t tmp_mode =3D cpu_to_le32(credp->fc_mode); err =3D fsetxattrat_nofollow(dirfd, path, "user.virtfs.mode", &tmp= _mode, sizeof(mode_t), 0); --=20 2.14.4