From nobody Sat Apr 22 09:00:53 2023 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 4Q3QNP5HpZz46RZs; Sat, 22 Apr 2023 09:00:53 +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 4Q3QNP42zmz4b8f; Sat, 22 Apr 2023 09:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154053; 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=Xqp+Qs1Nrjhh0qW7IdAJA1ZGo6gIhbC9h2HwQtHHpFY=; b=QCt9MNa2dyZWLqRI1DoRxTWXxdSrIZxEHsKj35f3AnzPryx5w65j6wUVlKA6X41jTDbrV8 ehub1xpExgdvV03Hd56XrmmEW6O7gimHZXe4wSqmUTDR4mbE4P14xwaAeSkTjTRMJKIhpn KVxcZO1ADCJdvWMjk1+YrDZ7RHE1J3ATEmBobJTB6/sBVfrkktnB6aBITvAgFT0CFcUCTK bJu4Typ+7PDvxF54wJwqIMee8QOr1CqTjPREr27er3GRmucLWaqWVF7wTINgARxMLyPiVC sDBM6UGHBKAXn9UtDpVBhH9Qeusq/5Kyb8N37YQIvTsDfEu+7euEyeukLuRmzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154053; 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=Xqp+Qs1Nrjhh0qW7IdAJA1ZGo6gIhbC9h2HwQtHHpFY=; b=C+FlwF/DDH2SQ8kHn35gSBVro9pi2j1F4QDOFTWxXjefOXVgTAQ2vaIBanjCVq6JqiZPrO l7p8/yzB0yWv8KRXiK34xeVUXCRPGvnBQt29Pi5o0C4liAWqrT2Ue/6S0YWmBjgpeeV5Sg YQg4fA2iZdPepkcmtfj3A5Lm4ZDaEUt4ZD+PfXRRc1ZcGoIrDdQuVydHwERsw5RcHKTjBY KwOYDri5XI2a/Xgr3KfMzHXX1MXGPGE7DKTk4sJHi6muTkyGPgxyL4zpFRnl+abmk5pIyt K28PoBOeHOE/hmrnefFajIoxbTmYt2K0PRmxHgkDqZNnqUfzGozuA2UYHXWa5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154053; a=rsa-sha256; cv=none; b=ZLi423OjfKEbg7HfzeXuZsvOEc7GXuGa89la/0c4XLBffZ5ZhhAOhRB214Oc2srEn1z0EN frZdArN7RNwn2ba0y62pL5RWGjXESOKgb3ebqo57cgN3TrhSZPaJZTHLfxv1M/IjofT6UJ KflMPSkiAcC83ih5wmtaYxdfOS5hBFOg6x0MPIFBKfpFts3CpR2Hc9ihFgagCTsvst6VWv 7qeEB5LEHodoXx/AF347AbKPcHNq0xdF/UntoZMCRopqEnA1HTT/8Fn+7/4tkfB0aSGnVK YbsJVgV9Ixevyd4qp7eQxxfAOGGWLot0iELyxC6fo2HuJ86ziI/rJXbqRj8ujQ== 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 4Q3QNP34Y2zwHc; Sat, 22 Apr 2023 09:00:53 +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 33M90rhX072788; Sat, 22 Apr 2023 09:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M90rAK072787; Sat, 22 Apr 2023 09:00:53 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:00:53 GMT Message-Id: <202304220900.33M90rAK072787@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: 5cc19c2f6c68 - stable/13 - bsnmp: make single bit bitfields unsigned to avoid clang 16 warning 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 5cc19c2f6c68afd557c6888b22095054a4b4e419 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5cc19c2f6c68afd557c6888b22095054a4b4e419 commit 5cc19c2f6c68afd557c6888b22095054a4b4e419 Author: Dimitry Andric AuthorDate: 2023-04-17 16:11:56 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 08:58:56 +0000 bsnmp: 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 bsnmp's snmpd.h: contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] peer->input.stream = 1; ^ ~ 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 b740e02500ca248e1096cf745a17d2a8fcc44fed) --- contrib/bsnmp/snmpd/snmpd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/bsnmp/snmpd/snmpd.h b/contrib/bsnmp/snmpd/snmpd.h index 48a7b44a04b2..394a4f4736d6 100644 --- a/contrib/bsnmp/snmpd/snmpd.h +++ b/contrib/bsnmp/snmpd/snmpd.h @@ -152,12 +152,12 @@ struct port_input { int fd; /* socket */ void *id; /* evSelect handle */ - int stream : 1; /* stream socket */ - int cred : 1; /* want credentials */ + u_int stream : 1; /* stream socket */ + u_int cred : 1; /* want credentials */ struct sockaddr *peer; /* last received packet */ socklen_t peerlen; - int priv : 1; /* peer is privileged */ + u_int priv : 1; /* peer is privileged */ u_char *buf; /* receive buffer */ size_t buflen; /* buffer length */