From nobody Tue Feb 01 17:45:22 2022 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 5B11D19B55A1; Tue, 1 Feb 2022 17:45:22 +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 4JpC4y1z1yz3Nx8; Tue, 1 Feb 2022 17:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643737522; 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=gIEHqK+BiE6Fzl8KwWYf0HOuYsL6LMQQJCTROKuo7hg=; b=J9OHt0i8dAn63INRYRd6e4vwbCjRHfr/s/pZuOg/AvMlnzy5suda9gGikSuckhMJUC9hyH 5Sycl/fTKBBNy4Cz1YM81O4q/tmsneZwFhcF5Bt+ZmBFLXgGBQhv8J9WW4RArS4/VlYsZX H6L1EKTBFv+5eQ1LzLjFdvTyOta/75cxXDOZBnkkRvsd/xDvTRPWWWRNGzz6ZeyWD+pIME XGhvq2Wbpd2V6h10SYE6Vyh1uFZjA4J0ePxfm5ag4A91VrQHkNGxBo25MJuihPrSPiMRGA MOyVUS92EpZRf6GD+pWSQKWWjiwRr/08lHYapHd1UMhncl5+5aV2QOHYXgUmsQ== 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 1BE4E1558A; Tue, 1 Feb 2022 17:45:22 +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 211HjMxg039982; Tue, 1 Feb 2022 17:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 211HjMWb039981; Tue, 1 Feb 2022 17:45:22 GMT (envelope-from git) Date: Tue, 1 Feb 2022 17:45:22 GMT Message-Id: <202202011745.211HjMWb039981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8a67a1a9646e - main - : Cast _BITSTR_BITS to int in a ternary operator. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a67a1a9646ef516fe84ecfa7ec3467b15b9e0cc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643737522; 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=gIEHqK+BiE6Fzl8KwWYf0HOuYsL6LMQQJCTROKuo7hg=; b=wrxpnjDEi6L4vbfhpoI0ETXWD7NZDVjkLZ89pXCldc6xp1rZ42HTSV8MINUeqK2cT+NuOF tnfIPmV13x7cKsAF2x7usC8HKXCbe0gyvZtsOnMbuydkVhXUijsS/kYTB7bJURJ8xCRGl7 WGAp0GCNe1g9ULhpBBc2VN6b9zr3VcF5J4yrORlO/rQRZZx4FkKxRxOYSSLBNYpzAjZUAK 1/UHgvX82m8MGGnaZ3DcWdf0iszsUFzFgK5iWgojojyHUX5Trubf4+q6Xfqiogojf2+hGh cLIMeImeoj1bDri2QpZ4wawt1Cc2zrQ6u5UlSWXQQZ0QUuLof04BKZEOA20SYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643737522; a=rsa-sha256; cv=none; b=K4YRpvHmgZNdnGgVTnj/JMsGfTIXusDecEW1VYPEszSFVSakwNxf9TyZnkRhMSZSQLZDhl g42B+/WlLRdEy0v1DcK7mituKcKnlREUeB+ApY9jnF4P47rrpUsjWF1zpy5tJYEoPle/B5 zkyScLhiX6HGtnuZjz8wSY0GyFWPvzAQ17jb41DFYpfK5O46vfWpqad5LtCTK5nfRJoezK ZCRny7iQ2C3/wpiws7jJqpNxwydxB2qRWRuhQXHFIen5tcuSeLSXDxYETWb95fZmai3eFA xzvaKrppvVxlzBusc6B5oDWQbYcZgN2lGWaBGJnRuSgnhI/dB3iefHfEHMXt6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8a67a1a9646ef516fe84ecfa7ec3467b15b9e0cc commit 8a67a1a9646ef516fe84ecfa7ec3467b15b9e0cc Author: John Baldwin AuthorDate: 2022-02-01 17:45:11 +0000 Commit: John Baldwin CommitDate: 2022-02-01 17:45:11 +0000 : Cast _BITSTR_BITS to int in a ternary operator. This fixes a -Wsign-compare error reported by GCC due to the two results of the ternary operator having differing signedness. Reviewed by: dougm, rlibby Differential Revision: https://reviews.freebsd.org/D34122 --- sys/sys/bitstring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/bitstring.h b/sys/sys/bitstring.h index 13d87ce418ea..e579f0dece13 100644 --- a/sys/sys/bitstring.h +++ b/sys/sys/bitstring.h @@ -304,7 +304,7 @@ bit_ff_area_at(bitstr_t *_bitstr, int _start, int _nbits, int _size, } _mask = _match ? _BITSTR_MASK : 0; - _maxshft = _bit_idx(_size - 1) == 0 ? _size : _BITSTR_BITS; + _maxshft = _bit_idx(_size - 1) == 0 ? _size : (int)_BITSTR_BITS; _value = 0; _curbitstr = _bitstr + _bit_idx(_start); _test = ~(_BITSTR_MASK << _bit_offset(_start));