From nobody Mon Apr 17 16:26:56 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 4Q0XWP0MNmz44slf; Mon, 17 Apr 2023 16:26: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 4Q0XWN5hgPz41nS; Mon, 17 Apr 2023 16:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748816; 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=pqTrDFKKy8SJ6Wg3PxBkXxwFRwt4Y1PCiF+nfQRxRJA=; b=wvxu5vAwH2g6+WJ0wG+CIAvQHslqBxdQDofC4f0ZnIsXkFIWwenCQzGD1/FQxr4qGkQnkp LORtInTpWWi6iqr7cD4fM4t1a6x/qjkC2xKafcDS9Ydss9Tf0YNTVX+zU4/Hiz0J8acqp2 FqKNEag/1Sd6hqtNCZJh5iSqUn9Pdk96Y06c+/hqXkpB9upoJY8ICP8I4Nlb3yAT0PIVNI 7H1Noa4zyBPUl6ARiQSqqs7mgkhBarXAxpGcxJU//NbernfL2zIWRscgcdu0A8Ear+J1Ty CMCjZVtevzQdpYTVBm51l1H8pdP02F3YKDd/sBZgT74dF3+/LI5r+d03jlj+nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748816; 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=pqTrDFKKy8SJ6Wg3PxBkXxwFRwt4Y1PCiF+nfQRxRJA=; b=f6zDIyKxy5OCBRiHj/zEm0REu/4EucXQNXb0Z5vTOttWP8wHAsHiaNJMPG4tj21AzChZO7 Au43ViOPMuxP3cedE+CkDFivB/P8VUgMBds3zvylRa1iwkyvmzJRUyD0ePLvoM8qN7P6R1 zX9GgSsehczVszwEZD3/6sv05+AYHyp6gRf+NpqnpBak+DX5CVudnDW8sTnzUYG+DoBjSq C+sFeeAd4qecJtapvwS8U0vIoq2/ros0J1fqa25+f5DvOMuMLjobuGVPsNITI3VxrnDPtI uHNESNE73M9oIN6peDotaYPl8uWKelfXSGjUGuF1HQg1T4PRDQxzOZkcMstsFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681748816; a=rsa-sha256; cv=none; b=qIn20koulAsZqpEFGxZdZYpZor3eiZV2t49rpyX9jnYG4SGutIjtGf8gL5xtVL2QlGYYa6 0dPlvmcsu7mgNfT7xyQh0pNA2Sl0WzLq6bQ+qlRNa0oa2ofuabgc8l3mx/who8Mou57xpx u1JA85ePoaCvJ0WutW1awna580krEG8VpifBXTF108Khl7j1Ho7jWXO2PUY+LhcGl4p6LT cba1KCs+MIEh5T75TpAKMoJlfHSaGrXD3A3gldTFcLn0zyxl349mNPkjIO9KYiNSpW87Kt 2iksygE3eY3zpxqKQakaFBqCLQPXymPf2JTvyo46Dj4lq4KbHMBFAPxm6fBWEg== 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 4Q0XWN4nFczcHf; Mon, 17 Apr 2023 16:26:56 +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 33HGQuBd036567; Mon, 17 Apr 2023 16:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HGQu2Q036566; Mon, 17 Apr 2023 16:26:56 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:26:56 GMT Message-Id: <202304171626.33HGQu2Q036566@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: b740e02500ca - main - 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/main X-Git-Reftype: branch X-Git-Commit: b740e02500ca248e1096cf745a17d2a8fcc44fed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b740e02500ca248e1096cf745a17d2a8fcc44fed commit b740e02500ca248e1096cf745a17d2a8fcc44fed Author: Dimitry Andric AuthorDate: 2023-04-17 16:11:56 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 16:26:03 +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 --- 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 */