From nobody Wed Apr 24 21:29:37 2024 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 4VPsZT5wkxz5J8Kk; Wed, 24 Apr 2024 21:29:37 +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 4VPsZT4Jgrz4VVP; Wed, 24 Apr 2024 21:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713994177; 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=c9fK7z6ZrEJocjWnjMevve14Pw6ZmdWE+9yMGdgo1f8=; b=U2aYxvqk/T5M4yodbRZNCMTF5vQnFAPTJldaMHLrT6LyWPFRJLZE1GyuEWkX8gQRATMOxk HV1kXNB9mJxw43K3ZLSliwYk7L9IV0EIBDWAHro5XDhjZhVw+ByMOEvfEAplTEEOI04Ida YGl+e8MfP5NcNLQYKcDeVDpTsAoDXkikMSDBSNfr4TNGy2rBNzTfdlrgngm17NqEBcxPbT pBOfxmOoOxa60/Z+a0kscPB/gZk6byws6cey/akfj2VdERQMi6OHNXaKbpDFnBzB17J53V njSj4QLjWj+nt0ZrsNAnGa1CWXshMdpmNi9N1iK3fE7u+FDlNZ5+GygGWJaTVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713994177; a=rsa-sha256; cv=none; b=oT5SAKmUhvp2D+aU3bhW9I+h9VE+oKCG+UBh/jUPbfWXrmuhzBFgKDBKlifhLrR+g9nDMt fjypkuVX1oycE3pqmCivG0OoyivOJByjVbqRbbWihXTfvGrXqmeZ5/BMYbUJp9g2rmFZmN X0hpNaTqzTSDvZdAiySgPDsK44/QKPVXIqTIYY5UgtH5GVvmf0Tyu85ggAyUiuaAvq9UZy 8HPgKlQWuKzwvPXsVKTWgbvNspgGxsfqsIyVoUum1mn/DRD+L5i0WCegaWMuJ6I+RVho8I x8gRtg9W7hlExGNa0gl93RvQmZZ8eq7I0RieiG1acoqNv5pEMOAY7/KtAs+aAw== 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=1713994177; 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=c9fK7z6ZrEJocjWnjMevve14Pw6ZmdWE+9yMGdgo1f8=; b=GiNDhO2XWKyUiWB4ulkqMnV4+ojfnELBdiHo1C9OhE9UhJIckjmqUugKpkCLLLw0z1tf0t F8yLlvr07okSMt/fy2K9AY/QLB4CoEJG58CaaTufsOVZKFpdCPfV+Bk3MSd8wJvbXuCICz qUsUPIQI6IriG6379FCz+QfTAR3eZe6I6KdJbDNk/VYHeYajzVazUd0Gp0Ayo0yBM9FH4T W7EJYSDjfyBzWtilot3YgDd5nL6qNpJn2pFffTvbRbkt+2wOrWhHU4ib2nMzfKDd724/2B WzAQB/4Y4lE56qqZQ4ve3fd6N/7JWSMndjMhpgqYInf5SdIBPbtN9Up3tJoJcg== 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 4VPsZT3wD2zXmM; Wed, 24 Apr 2024 21:29:37 +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 43OLTb9b086915; Wed, 24 Apr 2024 21:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OLTbbD086912; Wed, 24 Apr 2024 21:29:37 GMT (envelope-from git) Date: Wed, 24 Apr 2024 21:29:37 GMT Message-Id: <202404242129.43OLTbbD086912@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: 15dfc47b6adc - stable/13 - heimdal: asn1: Use unsigned bitfields for named bitsets 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-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: 15dfc47b6adc0ba6bf91f60d05c404c7621dbc11 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=15dfc47b6adc0ba6bf91f60d05c404c7621dbc11 commit 15dfc47b6adc0ba6bf91f60d05c404c7621dbc11 Author: Dimitry Andric AuthorDate: 2024-04-17 17:49:30 +0000 Commit: Dimitry Andric CommitDate: 2024-04-24 21:27:27 +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);