From nobody Sat Apr 22 09:00:52 2023 X-Original-To: dev-commits-src-branches@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 4Q3QNN6RQDz46RS0; Sat, 22 Apr 2023 09:00:52 +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 4Q3QNN2qbPz4b8P; Sat, 22 Apr 2023 09:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154052; 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=YIG4+2LmyFFTG+ljNoX+Nx3/gKF090OXIBsMXGHfy34=; b=wfOFAkjFRQ5L31OFomQn3lHhvKIIJqCSjn7X1ZVQjKavfyaldGURnGJTKbmAl+zPUdQQS9 1Fn2zOWGhLiq2Cp4wweZCMRSIttpTMq2eF6X/c+5II/mIQAnM6MqT5ieGLNwIu9BxB/00t 0aH3Zjtx3JlRKmoeQBb5/hcxwN2dwuj6pDhq8X7WuuKunfEy5qB+5JuvxDjFuHdszYXTpo uV861H8lR0scwviYRKaByeO3Jwuvts60BgTyEtkYuLfAR0Kxtj1v6AnoLjdkFZ3o8XyF0q p++6eWmdkpFPA0AJgZwWEH88Kc2AdrsGqZjL7K7ikV799Gzb7cBUNdL4+Y/SpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154052; 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=YIG4+2LmyFFTG+ljNoX+Nx3/gKF090OXIBsMXGHfy34=; b=oaG9CqrVDw+/bTYgg4l0aKQkK3EEHOXyf0UJ1kD8P7IMum6L7yjhQk0IbtulirGbVdsrjf SZGX1jUpFxiehKsjfUK9iKHt7HDqI+cKItw9vGWFv3WdNN5317BHxzTjksMUP1lCG/+kU6 9aWHFvtha44rI29gyEeImSKSucfCgPqqSRqquKYkIezJcQmf4vpbDOdN7FeMNHBWTBAIBM LMRujLinW5ukWTrqRhlxgdq+FaEObWjfo8/nADg4tPved7HOsrPPS3sdUgXjfNWjucEKap Ve8hon3l8WuYTHSZuehMtKQ28AXos+W/D65PV264ZBnx4xJzljIl21hfaNIeFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154052; a=rsa-sha256; cv=none; b=MfTGOdii5KICU61lD7IaR9buN068h9EsIAD4ZuaCBeDTtH6pzvAwaiw9XV68FEgXnKNZEN avufx3LdNN1k412QbZCSoc11cQC0BglCxWODZXh3PfZHfIldZJMkbzQqvHsIxxazyLMEaG EnNvQ50rsOwwdtVSXd8QcN3lx9KAYf/gWu1mezszk2t484rjcoQQhLfvkIZE4Mw4rCKj0Y TSGUMsnSUKEcr4zCtgEKNFWDFVtv334JtyfO9BVEx3N4rr6AA5xEhy1G+AYF6usOWfqy/E fY6lJHNrYoTLPEk/ROV4eIwWit++/tgidwIj2SPUjSbiwkrcMt+UytxIW3OItQ== 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 4Q3QNN1x1LzvSn; Sat, 22 Apr 2023 09:00:52 +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 33M90qEP072762; Sat, 22 Apr 2023 09:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M90qNV072761; Sat, 22 Apr 2023 09:00:52 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:00:52 GMT Message-Id: <202304220900.33M90qNV072761@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: 01bdf9acd258 - stable/13 - libsa: make single bit bitfields unsigned to avoid clang 16 warning List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 01bdf9acd2581b92ad0d7215c7cd744a2533346b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=01bdf9acd2581b92ad0d7215c7cd744a2533346b commit 01bdf9acd2581b92ad0d7215c7cd744a2533346b Author: Dimitry Andric AuthorDate: 2023-04-17 16:15:57 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 08:58:48 +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 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 */