From nobody Mon Feb 9 00:42:01 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; dkim=fail; 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 1529197367736413.52786090806; Sat, 16 Jun 2018 18:02:47 -0700 (PDT) Received: from localhost ([::1]:53379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUM5e-00013P-Rd for importer@patchew.org; Sat, 16 Jun 2018 21:02:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUM0S-0005hQ-4G for qemu-devel@nongnu.org; Sat, 16 Jun 2018 20:57:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUM0R-0003Fc-9o for qemu-devel@nongnu.org; Sat, 16 Jun 2018 20:57:24 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:42649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUM0R-0003FW-5G for qemu-devel@nongnu.org; Sat, 16 Jun 2018 20:57:23 -0400 Received: by mail-qk0-x242.google.com with SMTP id j80-v6so7659717qke.9 for ; Sat, 16 Jun 2018 17:57:22 -0700 (PDT) Received: from localhost.localdomain (96-86-104-61-static.hfc.comcastbusiness.net. [96.86.104.61]) by smtp.gmail.com with ESMTPSA id x21-v6sm7302186qto.2.2018.06.16.17.57.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 16 Jun 2018 17:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juliacomputing-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=UoSGfF6b9Eh1bDOJSj76wXhy+XcPWYROsCZ65drpFpE=; b=C4IpiX3eVuK/ALkSXu+EtTabu08Ryod75csmfotI+iuBzq8AXxxg8U0H5HePGlGrX+ 4t/mNx14Kx/13uhbx5n/PGjMzLFvQpgvblmHyWlXrxE5d6Z1fTW8+p4ZUxtqT8FP5j18 OmPmAC9Q+IJJUsH+TUTUm0so6nKVcG1/KgrD+b/bqI9Dy76jsCZBlTkx0yY3iRhxBLab mDjNn9Lds9b52wJ6d8Wjm18swlR06Vse5BuU00SxK3Oech/QhrO9PssrSzngyFEUXxBQ /LTT0I5dxnrt2VXd/19588eZlwZ4f0farvF+LLMvHEfCumvqi3h3L8sW/W8i3m7VEJro Bx3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=UoSGfF6b9Eh1bDOJSj76wXhy+XcPWYROsCZ65drpFpE=; b=aHi+lGezTR8GZFJ+qsgsRlBBFGLleYjO77qXOlagxvpFNWfyN/SAX1unQaGOeHob9j Ki6PF3n7zJrdvalMT6hkzPLxyMZ07XpJgqApRphbuZUaZVEJ9W1QRcg5fsvUuZzegE3p uRWPv4KnxTOXipMw+PPHwZsqLjENpS5c2DaNV/tlCrVTgfabl9oWn2FuEUdCzhHSD6Jo P3+ifbqpLwb0JeMP6pTG45+2d1ilfWYcQtb5OmoatC1uG9oPa+Nk+qP38jdXpb2QGPup w3Gqo492i4YXPrHF7vTsP0vTbJy8u62S5qvBtai0jSbIqWsaSXxyangoelMY500Ulrkc wnrg== X-Gm-Message-State: APt69E3l3ssUek78l7V1OTwWWo0X8BtNSuSreDkRPJSZ8u0UT6qH2Dux XHCq2S4lgbEiDa+VHmbDbnluOW466fU= X-Google-Smtp-Source: ADUXVKKfCKeUtQ9SB2rVObVzUaP70th/axTnbofmueFYCJWd8LSdHjsfPbt7bCzlxsK+EI7XJCRXgQ== X-Received: by 2002:a37:86c3:: with SMTP id i186-v6mr6198401qkd.70.1529197042408; Sat, 16 Jun 2018 17:57:22 -0700 (PDT) From: Keno Fischer To: qemu-devel@nongnu.org Date: Sat, 16 Jun 2018 20:56:49 -0400 Message-Id: <08ebbb93dbfc29bbb727c05a16cd5ded6dec42b3.1529196703.git.keno@juliacomputing.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [PATCH v3 05/13] 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: Keno Fischer , groug@kaod.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Comparisons of mode_t with -1 require an explicit cast, since mode_t is unsigned on Darwin. Signed-off-by: Keno Fischer --- 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 d713983..98d4073 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -310,7 +310,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) { @@ -416,7 +416,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.8.1