From nobody Wed Apr 17 17:51:56 2024 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 4VKT4Y2Z5Zz5HK61; Wed, 17 Apr 2024 17:51:57 +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 4VKT4X6rGbz45MT; Wed, 17 Apr 2024 17:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713376317; 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=Kqh4AAam2CYVci5C0mwjZ3FrJyDcrVIa3j7lwVxL/8M=; b=dag4lA254XagE2q4NinvYFOYfSCzuHhwj9y7KWYBMAHD3qQaJLKIKVmDaL/jq9Tk8N0uXe rYKjp32EP3+tpiQpNmDCsWCn/7rc8O+0iBtPXqPgp7skv8a6nkKdMj7exDM/pAdX0tMUNX 75p+ZodCgGImbo+vKmeIypaIF/3opMdl2cfNgVdte1MNiJdV/fAFmnG7dxx4dtbhUjFvTc VnvGkeUFsAJvgykm6o33rOCobfNO7pMnBspBd/R/HwZnBDZ6TwONfsMrqJHQ4CONLJESQC 4oxkbwNO9Q9nyzACj6rVg4JiStE6FSnt+zjna4Mkc2xxVDnemziM2Jg+NYkc5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713376317; a=rsa-sha256; cv=none; b=xZvkDigmRUVcgVmYNflI6XeqxAsU/iXjA1bobiOqJJJSg2/0KsTMlSu6S5bQYusg2hYFgH EFcR2lc5pX2Qgt+2jYO3H1QzCyxSJf3XRAllDW/9MrKdIFgdbGIafyMDMSCS1SZIfpPwgY AA5B/N107ojKlFWo40yfKxxdKw0HRfwWJzJhFnqGb57iDVDqMDJc2GSSOyeObBFNRA56Tq 8SVuWVnN2xkNBRb5++Rbi7X2IUou5Ww0De+5J3VFmqNeb9ekpIMXH6H/Aj3/SJB0naj/To Uzn12LJkk1PWcih6WjcWywGFIZHVpl3H7RrrawTvTrqT4lrOV+rF/WWc+Gdjxg== 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=1713376317; 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=Kqh4AAam2CYVci5C0mwjZ3FrJyDcrVIa3j7lwVxL/8M=; b=vFOWTWJ2twDaMkwcsmg4hK2d+iDNNe6YL5OWofMPd3oBjDEoO4QcplpWRTrrlU1Xt41it8 RsxR+Syrx+hjRxkLYPySy7OiFX7arJIZRi3haCfj2YhU6RVcGZIApvVsN9lQ29yf1Rmd6e Qu8QC5XT8pfs1ChodQ/vFJfiIS8dL6ZQTFmpZuqz/mQ3ISAIwti2H2gyOyBSEehTJhM04U wJq74ySFG7epPTYjMLgBCsY7U+YTzUIRgw/vIpGU8OUmC0ud0V4h53QPUP2uGcs8qoak0N bhQoMxlg6B9CwhqvzTOs+uTIZ7tLsUmU9risNhjXQeMNcu1u3/yyGlgWPs1wLg== 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 4VKT4X69pPzc1M; Wed, 17 Apr 2024 17:51:56 +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 43HHpuqv038008; Wed, 17 Apr 2024 17:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43HHpu4D038005; Wed, 17 Apr 2024 17:51:56 GMT (envelope-from git) Date: Wed, 17 Apr 2024 17:51:56 GMT Message-Id: <202404171751.43HHpu4D038005@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: 219b6e442308 - main - heimdal: asn1: Use unsigned bitfields for named bitsets 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 219b6e442308d5353b2af5f0771ce9b887b70754 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=219b6e442308d5353b2af5f0771ce9b887b70754 commit 219b6e442308d5353b2af5f0771ce9b887b70754 Author: Dimitry Andric AuthorDate: 2024-04-17 17:49:30 +0000 Commit: Dimitry Andric CommitDate: 2024-04-17 17:49:30 +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 --- 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);