From nobody Fri Apr 11 19:16:40 2025 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 4ZZ5yd28rMz5sXBh; Fri, 11 Apr 2025 19:16:41 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZZ5yd0CSDz3gJq; Fri, 11 Apr 2025 19:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744399001; 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=WHMg+MOo2NLXAIuu9mKtdN5dkjIOnsDKTXs679Nx/zA=; b=mgfbYQLHTDvgeeHCGuLB4tN63a+dJugErxIv4PKj6jHVo58iwbFR6Zt2dR4M181pGEaubA 4KzN9Z0b6y4HwlRmOnEvzDti5fDzBB5k9GyT74SeOJEXOu9ZJx2Weaa+J19wgPicLfqYCg eCXK1GQTN19ylA5ipm8Yy+23arKt/5iifd0jA1Stvfo7szKFDlaTUFS6LheEIL8Fy1EI/+ 35q1eOw1X00D/tUvgC0/yXZFYtz6baeEoevtpq1EmrT0BcjuKvuHv9SvMzdNWlFh52eCEP 5m2JQMBu25TpLFOfrgzykHgsyZdGuwJn5Gy2aPEj2u1LwunsYlQnrRXW9EVJog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1744399001; a=rsa-sha256; cv=none; b=kaS05N/jCQPzKDns08DX3Oqe1i+OKupga480bv9QsNRo3M5t+D+ma/DbUSqQe9WYcAddDo oWNXG0XvRJ+hFBSZHRlCxnZDAfV4VugqEIQSpvnphj7zG4gkVkMYXIjUvfYGZeGvEZbYZk xRKL4H6LOYKsez+m3IdEbAmD0J1xoPeY8W8Zo8f4oipH1IaaKg0ecPIMGGz21l8tEoVK7y CfNk4JwRDRUshxcnl8INRffCVuD6w2ZcKNzu2QrwDNVhOsBT/o1+Pf2pUcLVPbGAsNzlxj gxuZ1k6j2ahF/6lFwfjUAWKmI5G7EIq5+IvI1+2URIdSyAMW62Bx1x+e7a0cmQ== 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=1744399001; 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=WHMg+MOo2NLXAIuu9mKtdN5dkjIOnsDKTXs679Nx/zA=; b=uZaeiNXgss0mGXPzTojh2fazIHJAIErAcUO0+LmKdRsyeyCd2K6KmlX1zo2c5s6V7MfnPw zCzRqaVsMvGrtr43o14fYoIF/qiYcBzMNKzVv8TTcAXAePE9B0lvzwwoDul72+g4Q3BVPK 3IRX+fHlqJI6Obg61yvFfF5wQe8JaBsjLdrdMu/fPG1VU1XqkFWHHxXJ401oauSi0Q6boZ pAwqeSB3gBDn3kTSbSUl4wrnyt+tUrNvQmSVhh+Q6gSZrQhpRczJQMaRUsSAyWwoT0mrrk PXhp1uroogAvHDpiE0pWy4WGwfpPwn7UgKrLSa451APMqH9S6dCthMN9/dXVcA== 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 4ZZ5yc6w79zm82; Fri, 11 Apr 2025 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53BJGePI035818; Fri, 11 Apr 2025 19:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53BJGeAH035815; Fri, 11 Apr 2025 19:16:40 GMT (envelope-from git) Date: Fri, 11 Apr 2025 19:16:40 GMT Message-Id: <202504111916.53BJGeAH035815@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: faae895fec65 - main - fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: faae895fec6571242ae05b11bc7eba0dff83fa49 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=faae895fec6571242ae05b11bc7eba0dff83fa49 commit faae895fec6571242ae05b11bc7eba0dff83fa49 Author: John Baldwin AuthorDate: 2025-04-11 19:12:58 +0000 Commit: John Baldwin CommitDate: 2025-04-11 19:12:58 +0000 fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size warning tests/sys/fs/fusefs/xattr.cc:572:50: error: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Werror,-Wstrlcpy-strlcat-size] 572 | strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1)); | ~~~~~~~^~~~~~~ The warning is correct in that the size is the size of the source, but that is intended in this case. Use memcpy() instead of strlcpy() to match the same code in the size_only_race_smaller test above. Differential Revision: https://reviews.freebsd.org/D49786 --- tests/sys/fs/fusefs/xattr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/xattr.cc b/tests/sys/fs/fusefs/xattr.cc index b1cbb9ffa768..0cd2783551b4 100644 --- a/tests/sys/fs/fusefs/xattr.cc +++ b/tests/sys/fs/fusefs/xattr.cc @@ -569,7 +569,7 @@ TEST_F(Listxattr, size_only_race_smaller) })); expect_listxattr(ino, sizeof(attrs0), ReturnImmediate([&](auto in __unused, auto& out) { - strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1)); + memcpy((char*)out.body.bytes, attrs1, sizeof(attrs1)); out.header.len = sizeof(fuse_out_header) + sizeof(attrs1); })