From nobody Mon Dec 05 00:32:18 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 4NQPdG57GQz4k2PQ; Mon, 5 Dec 2022 00:32:18 +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 4NQPdG4hvhz3CHh; Mon, 5 Dec 2022 00:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670200338; 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=LTpdxe2GXGAQlHXwc6GB9Qds7CyOheOrJzLHk47XCts=; b=GURxYmGPWl0VcIaAcbo3jczF3t/krBd/vMn9MT2Keo6wdt36qHCVaTUjFPbbo2SeH+k4M3 AXYI4jh9a2gOOlkH+P/ubksM58LNkiEvRYUmSXwhJa/30KTv/cnfKexeWvModpPehfF/Kh 3m4s+EVize2P/350P6vSh5hA2PRgaxFcQYMymYexNYAWfjGwT5ym9GYI+PKn2eNdgBoAtE aKXN78v2ctL2Rvy+ogZxcZ6D+TDtQ81ssSdYi5wt9P/8PkFKwQPIZSNuaXasAO+VUr0dwR TMaOjTiESx0kGtEIZ7FRSZdxdV5KZD/k/QuRaqL05xrXw+lCoabwv3zQC6dxOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670200338; 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=LTpdxe2GXGAQlHXwc6GB9Qds7CyOheOrJzLHk47XCts=; b=ifWB3oTdLdZdvrlBmt4ejv/uebTSm0wkWtPLf4lOLav7dFeiFsOocDtixl/ukkIBx8iEKe sRxDIGv3iQUGxYPnNA+d+cNGQgrfQINZWFadMeFzDEIE0xoCWWYdT8hwMd8PRwvUAdC0I3 xWGiKJsJNUqnyrk8oh5AUj+oDMykRJSv/X5cTxovknW9s4wRuAfvZ+pKUS9KSH+lXcm4yj CDlYp8cmN6QTcas2FXnlmfIxBXp/S23MtnGds8H5ICVwvCpFQZRamG4G4NHT1O/CRv0ZO4 6CUv+08si2nLpTCuJwJgnhr4JRzCHkZka4Ym4wDyWTnCnP0Hl3p/znMdngvnGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670200338; a=rsa-sha256; cv=none; b=xM/RLmJzCG6rzncggMIYq7f6IUNS4ntwUrFdttUDKnp5o25ZT89RAz0qFpFCKVbDsOIwg9 GRZjqanWZ70xcPhTqzT5/3eXCTMCdRxf0NcUCpWGp5xZ0z8SAzSNhFM/fHMswLmUf5tozR OsbsiT+Gm+XlANXFv+ePTd0QkI5F/7xo3pbKujSwDKdWXa28JkwTJL4N4BWRmJOvlZ8Ozu KS14lF1QyCoOQwSrC+LMqKZrcW5UTfn8uaKOePFe1/jy8t40eR2/LeRV9orKjFu9xp/P2v eT9gN/65jfz7TZR3qHQUPtO1S/12Gy0P5i6+IIq0ogwX5zeDIe/TybmHr8R8lw== 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 4NQPdG3mHRzdlc; Mon, 5 Dec 2022 00:32:18 +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 2B50WI0M074274; Mon, 5 Dec 2022 00:32:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B50WIWe074273; Mon, 5 Dec 2022 00:32:18 GMT (envelope-from git) Date: Mon, 5 Dec 2022 00:32:18 GMT Message-Id: <202212050032.2B50WIWe074273@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: 8dd8d56d9576 - main - posixshm_test: Fix sign mismatches in ?: results. 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: 8dd8d56d95763ffc914bb729eb27d720cd8ab5eb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8dd8d56d95763ffc914bb729eb27d720cd8ab5eb commit 8dd8d56d95763ffc914bb729eb27d720cd8ab5eb Author: John Baldwin AuthorDate: 2022-12-05 00:31:05 +0000 Commit: John Baldwin CommitDate: 2022-12-05 00:31:05 +0000 posixshm_test: Fix sign mismatches in ?: results. GCC 12's -Wsign-compare complains if the two alternative results of the ?: operator are differently signed. Cast the small, sub-page off_t values to size_t to quiet the warning. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D37539 --- tests/sys/posixshm/posixshm_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index c84eca319e0e..6398f5f6e085 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -195,7 +195,7 @@ shm_fill(int fd, off_t offset, off_t len) return (1); while (len > 0) { - blen = len < (off_t)page_size ? len : page_size; + blen = len < (off_t)page_size ? (size_t)len : page_size; memset(buf, byte_to_fill, blen); if (pwrite(fd, buf, blen, offset) != (ssize_t)blen) { error = 1; @@ -236,7 +236,7 @@ check_content_dealloc(int fd, off_t hole_start, off_t hole_len, off_t shm_sz) offset = hole_start; resid = hole_len; while (resid > 0) { - blen = resid < (off_t)page_size ? resid : page_size; + blen = resid < (off_t)page_size ? (size_t)resid : page_size; if (pread(fd, buf, blen, offset) != (ssize_t)blen) { error = 1; break; @@ -257,7 +257,7 @@ check_content_dealloc(int fd, off_t hole_start, off_t hole_len, off_t shm_sz) offset = 0; resid = hole_start; while (resid > 0) { - blen = resid < (off_t)page_size ? resid : page_size; + blen = resid < (off_t)page_size ? (size_t)resid : page_size; if (pread(fd, buf, blen, offset) != (ssize_t)blen) { error = 1; break; @@ -276,7 +276,7 @@ check_content_dealloc(int fd, off_t hole_start, off_t hole_len, off_t shm_sz) offset = hole_start + hole_len; resid = shm_sz - offset; while (resid > 0) { - blen = resid < (off_t)page_size ? resid : page_size; + blen = resid < (off_t)page_size ? (size_t)resid : page_size; if (pread(fd, buf, blen, offset) != (ssize_t)blen) { error = 1; break;