From nobody Wed Apr 24 21:28:09 2024 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 4VPsXn46PFz5J87l; Wed, 24 Apr 2024 21:28:09 +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 4VPsXn1XN2z4T2b; Wed, 24 Apr 2024 21:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713994089; 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=O8CQasD7ilfgy4IS8husfxa84nicp5qspuA1ThHW9Rk=; b=t4D1mj+UIhCJ5/BtGsJkEDJN2FLwijqg5l1xIFdIkUi72QNvuEzyViCioH5CaNhzrwAy4E UlpS8xXt0aiimKcLeaiw2AsKtC5FFeucZ3jWcXZ+VyOLU8MyfkNv9m7KsEFWevbYLlHGjQ tYn6q/CsuptElRUlGeOiklYkHX2iAPFV49eamSvJQQDNMUlpLY3tXd3jthEpR3c7f2p9n8 u2XjOpNzpfRoRXk5DQXvne6NvzuA0zTmASLSoBhrradKvwI4dQgcGLE0+Qex7kVhH3NWZ8 SE7z9i9/linsedupYtY4JQeJSjsY+7kdxgj4Ui+zeLFOQOzOhGeHkXEG4Q47xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713994089; a=rsa-sha256; cv=none; b=GodAHNjdD0Pn0bFRcljQgHil9a9ZBNMdVwvqZBq/esXuNYBZYJswlgR6pGUh0xgoeqeEm4 WiXgSFdyLkmrk1bhysrxHXZOVxX0J9r5xjW22ArAICYCWmItXcVvLdtLvCzwQGRQlvLhW+ pHyEcfXswNDE1zFYan2fWhvg6vFXtVcMdWgeTSZ61Htdn7IEN1CLttW5g9uH4U6pnG06bU lZTfiwsfNdSOPTP3J9SNHxOiK/IaG+fmy5XLJCBt9ZVex9r/QmRIGMyu6ElQp6NeU/xHzC 7bTWHDprPD3QsjlVJouXmxu2F/GNaQ22TxmQGo56fZoc87KiH5HIs11zotb2Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713994089; 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=O8CQasD7ilfgy4IS8husfxa84nicp5qspuA1ThHW9Rk=; b=LX+tt9XgQf3/x1G81eSN8eLzc6ytYRhkiSmvEZw47qP7Gym5TDWqx7lCL8kURmjIWBJOVb TTXlfMjAW224B76ofQD9duDi3yg0mfNAF/yyODlW7d13FJrVuf4Bloi8jkFPnEjnqloF/B fkQ85khsckYl5STOTRpghSnpfwLdE7UyUeiKlheQOTnU/ImL3tJqahXqlrh5GAz3XB20pP 1xwCpx15+sm0QCEI4xs4iECNSRm8eYDr+oBGQgqboY+vKRi3nX2+6ZgvxrNoDnayXKKtDW cViua25CF3b9iglSYryNNDo7DuWpEAOJVLYmJUovPzHTjdFGZNIFKeqHqWalLw== 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 4VPsXn0sP2zXMK; Wed, 24 Apr 2024 21:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OLS9nL086299; Wed, 24 Apr 2024 21:28:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OLS9Y3086296; Wed, 24 Apr 2024 21:28:09 GMT (envelope-from git) Date: Wed, 24 Apr 2024 21:28:09 GMT Message-Id: <202404242128.43OLS9Y3086296@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: 689dbdedd8bd - stable/14 - heimdal: asn1: Use unsigned bitfields for named bitsets 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/14 X-Git-Reftype: branch X-Git-Commit: 689dbdedd8bdaa0e6c7149a7a26dc77ba9db886e Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=689dbdedd8bdaa0e6c7149a7a26dc77ba9db886e commit 689dbdedd8bdaa0e6c7149a7a26dc77ba9db886e Author: Dimitry Andric AuthorDate: 2024-04-17 17:49:30 +0000 Commit: Dimitry Andric CommitDate: 2024-04-24 21:27:11 +0000 heimdal: asn1: Use unsigned bitfields for named bitsets Import upstream 6747e1628: asn1: Use unsigned bitfields for named bitsets Signed 1-bit bitfields are undefined in C. This should fix the following warnings, which for unknown reasons are errors in CI: /usr/src/crypto/heimdal/lib/hx509/ca.c:1020:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1020 | ku.digitalSignature = 1; | ^ ~ /usr/src/crypto/heimdal/lib/hx509/ca.c:1021:21: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1021 | ku.keyEncipherment = 1; | ^ ~ /usr/src/crypto/heimdal/lib/hx509/ca.c:1028:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1028 | ku.keyCertSign = 1; | ^ ~ /usr/src/crypto/heimdal/lib/hx509/ca.c:1029:13: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1029 | ku.cRLSign = 1; | ^ ~ PR: 276960 Fixes: 1b7487592987 MFC after: 1 week (cherry picked from commit 219b6e442308d5353b2af5f0771ce9b887b70754) --- crypto/heimdal/lib/asn1/gen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/heimdal/lib/asn1/gen.c b/crypto/heimdal/lib/asn1/gen.c index 76a893c5ade7..f35d41667a57 100644 --- a/crypto/heimdal/lib/asn1/gen.c +++ b/crypto/heimdal/lib/asn1/gen.c @@ -727,10 +727,10 @@ define_type (int level, const char *name, const char *basename, Type *t, int typ fprintf (headerfile, "int64_t %s;\n", name); } else if (t->range->min >= 0 && t->range->max > UINT_MAX) { fprintf (headerfile, "uint64_t %s;\n", name); - } else if (t->range->min >= INT_MIN && t->range->max <= INT_MAX) { - fprintf (headerfile, "int %s;\n", name); } else if (t->range->min >= 0 && t->range->max <= UINT_MAX) { fprintf (headerfile, "unsigned int %s;\n", name); + } else if (t->range->min >= INT_MIN && t->range->max <= INT_MAX) { + fprintf (headerfile, "int %s;\n", name); } else errx(1, "%s: unsupported range %" PRId64 " -> %" PRId64 "", name, t->range->min, t->range->max);