From nobody Sat Apr 22 09:01:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q3QNn2zbxz46RVy; Sat, 22 Apr 2023 09:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q3QNn2YZRz4cbY; Sat, 22 Apr 2023 09:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=62C8F8wvIl4TZtULD3S18BGO+G5YMtGRD1cCft1Aaa8=; b=TBGTYd04yBh/ukJN6s6uNoNN4DqfEM3RBCT/gwNQF/R5//yROLxVeRAZYQRvNkZh7PeKA/ 50jzynsZ6lMEOAFHUmXBm3BC0D0+SWI1f91v3Hpy9CczZMpdC7RQHozMQQTxY1wUlTFRc1 yR+/3hUUfGVZRbPc1oJHZBsRFRonJUeMGbBUdV0TJRUx/rW2LzwNKQbZ/7PfikiO3BBLWS Um7IOml1yni1k0nnoKOY3Z6pzKHXUIEjsbllW533IlyFIss0RC8quDDyuF5/lMmhPcWlrX 6Ljbb3kOBHH6eo6QO1BiDB1ZaBjqhflGSi6S3R9lPdNJB8HW2zdv75h7MeC8XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=62C8F8wvIl4TZtULD3S18BGO+G5YMtGRD1cCft1Aaa8=; b=fA2QlUItl7mn3Lkv8tVmiG8jhoFN8syri3908uESCXuCvc+l9JxdN2xpbC9YnjeC5C2+GD E2ebp0C1iZbrPr2G5aBopdaKqugEM7U1VyoecrvglbH2lr5qSn+NtKuDFbY7ZdtDiBbEMV kgCqZ2RDIxTrauUCQDmcKyHC9DUFKHddyzzrJc57agOPJGis5BGEm1MKBuMwpiiUIQ3jKe n2pRURnUAw+WsaCzyZF+3/GBdO0/K52uONdEausG3fYwD4Ep6IpuO0nVp7rXHWvE4bM0jE w1xKECNo7Gf2gJA7fiSk/iNiqsoio+Fh+hEGRAfIIsM7eRwzYeNJVpmp0Axh+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154073; a=rsa-sha256; cv=none; b=m+++L7PZMdaHxCCcc/R9RwZfXPh33TkovEkh6d/+lOm7Ll8J57glcelhsLkEvNA74KBC0P JJ8c1AfN3xF0kmdjFWICZbbBwv35UvjwCBRhwiww/jg5RYjf8X3VYF4Q2hPP43v6IF6TMf s0eSjwIcJqLtE6MNY1FNZquoXcVMYBSYoKs+zCpC0Dl4z2iyrdjRLskoa0j2X3wQvgHfbS VAAthnI4Pzt2hN7AekvefzbOy/BtiLD8jUYEGsljvwHrQ2e2ktQ7FeaMUj2oOQaSAdU93P imI9J7N0qIFGMee4lQ8N1KeDoYqNKBpjC8Gj64KTGL1Sog/tCidgGscGdvZuPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNn1f4dzvws; Sat, 22 Apr 2023 09:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33M91DtY074774; Sat, 22 Apr 2023 09:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M91DxQ074773; Sat, 22 Apr 2023 09:01:13 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:01:13 GMT Message-Id: <202304220901.33M91DxQ074773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f65f23e90da8 - stable/12 - libsa: make single bit bitfields unsigned to avoid clang 16 warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f65f23e90da89a517dada5a4f330b181833e7a6b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f65f23e90da89a517dada5a4f330b181833e7a6b commit f65f23e90da89a517dada5a4f330b181833e7a6b Author: Dimitry Andric AuthorDate: 2023-04-17 16:15:57 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 09:00:01 +0000 libsa: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in libsa's tftp.c: stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* very short file */ ^ ~ stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* EOF */ ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned. MFC after: 3 days (cherry picked from commit 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8) --- stand/libsa/tftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libsa/tftp.c b/stand/libsa/tftp.c index 22e03ab58da1..8436bab31ae1 100644 --- a/stand/libsa/tftp.c +++ b/stand/libsa/tftp.c @@ -103,8 +103,8 @@ static int is_open = 0; struct tftp_handle { struct iodesc *iodesc; int currblock; /* contents of lastdata */ - int islastblock:1; /* flag */ - int tries:4; /* number of read attempts */ + unsigned int islastblock:1; /* flag */ + unsigned int tries:4; /* number of read attempts */ int validsize; int off; char *path; /* saved for re-requests */