From nobody Fri Apr 4 21:35:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com ARC-Seal: i=1; a=rsa-sha256; t=1739198433; cv=none; d=zohomail.com; s=zohoarc; b=Mu4QnwhgX0DRDZ0tVr1WVdLEQe1MLOVX85BtGqfddwhnCmOqf8A5iKjSHEz+yY+T1AP6gyVRTolZaA0E0El2UgHBk2tUHv0N9GII00Ku0ANVd46dvGnmFi164iBbdqcqcqg9RCec1W6b8dFC6r9vCVgfY6jVRC1e1uG57YN8I7Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739198433; h=Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DaH5KDHgomo+0iGZmUJRIIWnIfIXhKZQs5b/ihv6qzQ=; b=OnLSTp20HID97+X/vX7m3u29fr+F7CqYQld/pjbHZB5l1Z6RREwtIAd7ojFr+WreessN7xXBxeaCyguK0ds1r5qcvLo3nHpRKYx03rqjguehuz/F+t5TP8njHlRrCXPgRzXPbVzYnq9Erea1C7x7S5pNijV0waR8deZibqWy4uI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739198433894270.55229540549726; Mon, 10 Feb 2025 06:40:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1thUwy-0007Rt-Rk; Mon, 10 Feb 2025 09:39:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1thUwx-0007PQ-I2 for qemu-devel@nongnu.org; Mon, 10 Feb 2025 09:39:51 -0500 Received: from kylie.crudebyte.com ([5.189.157.229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1thUwv-0001GT-R1 for qemu-devel@nongnu.org; Mon, 10 Feb 2025 09:39:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=kylie; h=Message-Id:Cc:To:Subject:Date:From:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Content-ID: Content-Description; bh=DaH5KDHgomo+0iGZmUJRIIWnIfIXhKZQs5b/ihv6qzQ=; b=ndU1+ Qk1+W05xGU724YbfKNqY7GkvUdm7p/G6WTTMGSx65NYmdQ482KCin82NEzJSC9bMCeNNymsnWOh9V qeEjdLOULBH0H6HyNNZjaZvYxQ7uEUPZLUpdcMV1RxmqyjaglOhO4UygzeS1MyYIF11mbA7SoXRDN Q4sHbt6+nwGNNlwsVJ96ZI1MTH3NmnedCCrSQ3k81JYyFTJp8j+uXI3LgqEOVlftFFisVRTHitmSi 5LDdkFuO2lfI5GM4rkxU2zSk0Z/NNBfPrWf8E0Mm5F1AT6eoyyOHS5BiRVRIzbSEGuOAu1i/BgMjg kgtM6G3Giw6TrOhwPIqB0HEy6Pr9GequKP4ZgIRUYTRepGKJByzJbB+3jK8cdJShALd6DAI82/9pW flrou45I8a/KH74bD+lFtGYxq2P8MxLAPWX/J2X28YpzCNAyYeDIKXTA2vULdDW5PI9rjvP+yWjjN c3xqNRWEJJ72oJcT9+8p332YnbQ1z5Yp1VJfKZddPGxFJE6wdcWQfD1C2RsbRXCq8cP7Zjqf8m6Qk 6/gAIhYjgWQAbmrHaE6mH9ZEh5isQbdB+yuJObv2oJr5QLDQf+r1bYkmewouMY16lV4DUoRnPNWKM QwPVfcf5Vm/1foX9bLnW3+jIgpXOEWPmKoTxrOdkUIaFp5w7XfxHyumn8A3rHU=; From: Christian Schoenebeck Date: Mon, 10 Feb 2025 15:33:59 +0100 Subject: [PATCH] 9pfs: fix dead code in qemu_open_flags_tostr() To: qemu-devel@nongnu.org Cc: Greg Kurz Message-Id: Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=5.189.157.229; envelope-from=c32b228592cf7b4f18b404e1b91a6eedc83d3f85@kylie.crudebyte.com; helo=kylie.crudebyte.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @crudebyte.com) X-ZM-MESSAGEID: 1739198435259019000 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Coverity scan complained about expression "|LARGEFILE" to be non reachable and the detailed Coverity report claims O_LARGEFILE was zero. I can't reproduce this here, but I assume that means there are at least some system(s) which define O_LARGEFILE as zero. This is not really an issue, but to silence this Coverity warning, add a preprocessor wrapper that checks for O_LARGEFILE being non-zero for this overall expression. The 'defined(O_LARGEFILE)' check is not necessary, but it makes it more clear that we really want to check for the value of O_LARGEFILE, not just whether the macro was defined. Fixes: 9a0dd4b3 Resolves: Coverity CID 1591178 Reported-by: Coverity Scan Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-util-generic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/9pfs/9p-util-generic.c b/hw/9pfs/9p-util-generic.c index 4c1e9c887d..02e359f17b 100644 --- a/hw/9pfs/9p-util-generic.c +++ b/hw/9pfs/9p-util-generic.c @@ -19,7 +19,9 @@ char *qemu_open_flags_tostr(int flags) #ifdef O_DIRECT (flags & O_DIRECT) ? "|DIRECT" : "", #endif + #if defined(O_LARGEFILE) && O_LARGEFILE !=3D 0 (flags & O_LARGEFILE) ? "|LARGEFILE" : "", + #endif (flags & O_DIRECTORY) ? "|DIRECTORY" : "", (flags & O_NOFOLLOW) ? "|NOFOLLOW" : "", #ifdef O_NOATIME --=20 2.39.5