From nobody Mon Apr 17 16:26:57 2023 X-Original-To: dev-commits-src-main@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 4Q0XWQ3tnyz44sJR; Mon, 17 Apr 2023 16:26:58 +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 4Q0XWQ0Nzqz422l; Mon, 17 Apr 2023 16:26:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748818; 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=4rLDNGFcfBx5/MuDALJBxWS7uTLRVhnOydhRNAK2wWA=; b=LYHQ8cFz7iX8ksoVj6lHOv9Sbb7blLlL4f6R+k45+SaimjkftNTIe7lTGMyUDsbloh0S/R E8s1Ul+AvF035gS6viNSK1+D4C0QJuBPvZq49WtbmdijeTxWD/lD9MPjy/WgxBO/M/Ow3Y 3wcJp63Z3fOX8pbVo8kSqLsvG2fs2KkJk0dhiaPROoSfnpw0fyZoPwp/srXbW8mUXdD7Mf kmOixU2Nb0LwyTjHWXe++my+rT44hc61/NiWmxZPEL9zKREeSBSrGL17ynNyaQoPFVp2t0 IeKFiH6GPOovUxSaZ1UdQvW207C8WdpXIyAjMpH9PtnU/NnKmVy+sbk+JYLihA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748818; 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=4rLDNGFcfBx5/MuDALJBxWS7uTLRVhnOydhRNAK2wWA=; b=Le4OQm7Bo2rEasDOqOPyAtK2KfWu22T0Nmd9BrFlNFxNoJ9fGzdWj+g+N21cTKhPuyGhW0 eroEJEY7+oZcrRMOZIs0+2gxEFBQKFRclcFOI+oujfLgQvvShDuhemIBnzVkEn3F++E6zt QVa0XQ9B6v7Fcf4rL1L1sCAwfqp17rbLUON5xCqYpw7MvloWTlAcpiQ8D8Du/uWg4OQuIc 93VHVSDOOGvCmorY/lye7msORuodTBEsEZpJHEKRmvv8J5sHthOlVgKjuuMeFcyTwwn1sD iypKnW1JC/U4EJyLqlodQ7xJp3okNtAQP1Jptf/5Mq745jCv+dXi2mxJxZCK4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681748818; a=rsa-sha256; cv=none; b=GZIb6oQNkst/3l0BiPeRRnxi69aiNEXlT1Zhnr4INF2Mmv++NeSOMGa9EVcdQ/Pui66c3V HPB6qW9WRyaBtei8osDUYqQvdLwgkRex19c6eza4uydfMEuPaHRSWPZPfglwlZf8vvxmlk 8QtGfHvUnIrqP4gsk9QYpci0ojMxsQ4dfFRRXbApwtpsfH00RgSM7j5WQJGS8Otg2eGRnj ccmDQBL1Ju+X5iUysaOQ5QtSYOxHGMMck20IbcgUj30S1pGRdPA3s99Ne5/HH8yUdGqZkb vbPEvqqkZVnnbTRk2PXH/3aWkmc+7leSSr7PHdMhGBrYu6miLIgyADLSsnkvWA== 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 4Q0XWP5QQ4zbp4; Mon, 17 Apr 2023 16:26:57 +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 33HGQvmX036587; Mon, 17 Apr 2023 16:26:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HGQvXv036586; Mon, 17 Apr 2023 16:26:57 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:26:57 GMT Message-Id: <202304171626.33HGQvXv036586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 1a3ccb8f1552 - main - libsa: make single bit bitfields unsigned to avoid clang 16 warning List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1a3ccb8f1552977e1b264e3b89d1fba8e717dad8 commit 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8 Author: Dimitry Andric AuthorDate: 2023-04-17 16:15:57 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 16:26:11 +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 --- 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 903537b4bbe5..f1e056da3561 100644 --- a/stand/libsa/tftp.c +++ b/stand/libsa/tftp.c @@ -106,8 +106,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 */