From owner-dev-commits-src-all@freebsd.org Wed Sep 15 16:05:32 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E9A3668FC1; Wed, 15 Sep 2021 16:05:32 +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 4H8lRw11gPz3GQk; Wed, 15 Sep 2021 16:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 03D9310DC7; Wed, 15 Sep 2021 16:05:32 +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 18FG5VIx086507; Wed, 15 Sep 2021 16:05:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18FG5Vu3086506; Wed, 15 Sep 2021 16:05:31 GMT (envelope-from git) Date: Wed, 15 Sep 2021 16:05:31 GMT Message-Id: <202109151605.18FG5Vu3086506@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: cd16a848d1b3 - main - posixshmtest: Fix various warnings raised by GCC. 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: cd16a848d1b34016b1a1c663223729a92c247be3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2021 16:05:32 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cd16a848d1b34016b1a1c663223729a92c247be3 commit cd16a848d1b34016b1a1c663223729a92c247be3 Author: John Baldwin AuthorDate: 2021-09-15 16:03:18 +0000 Commit: John Baldwin CommitDate: 2021-09-15 16:03:18 +0000 posixshmtest: Fix various warnings raised by GCC. - Remove unused format string arguments. - Remove a set but unused variable. Reviewed by: khng, kib Differential Revision: https://reviews.freebsd.org/D31946 --- tests/sys/posixshm/posixshm_test.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index eddb1d2d8250..b460639ba647 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -1105,7 +1105,7 @@ ATF_TC_BODY(fspacectl, tc) ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, "Aligned fspacectl failed; errno=%d", errno); ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, - "Aligned fspacectl content checking failed", errno); + "Aligned fspacectl content checking failed"); /* Unaligned fspacectl(fd, SPACECTL_DEALLOC, ...) */ ATF_REQUIRE(shm_fill(fd, 0, shm_sz) == 0); @@ -1115,7 +1115,7 @@ ATF_TC_BODY(fspacectl, tc) ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, "Unaligned fspacectl failed; errno=%d", errno); ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, - "Unaligned fspacectl content checking failed", errno); + "Unaligned fspacectl content checking failed"); /* Aligned fspacectl(fd, SPACECTL_DEALLOC, ...) to OFF_MAX */ ATF_REQUIRE(shm_fill(fd, 0, shm_sz) == 0); @@ -1124,7 +1124,7 @@ ATF_TC_BODY(fspacectl, tc) ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, "Aligned fspacectl to OFF_MAX failed; errno=%d", errno); ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, - "Aligned fspacectl to OFF_MAX content checking failed", errno); + "Aligned fspacectl to OFF_MAX content checking failed"); /* Unaligned fspacectl(fd, SPACECTL_DEALLOC, ...) to OFF_MAX */ ATF_REQUIRE(shm_fill(fd, 0, shm_sz) == 0); @@ -1133,7 +1133,7 @@ ATF_TC_BODY(fspacectl, tc) ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, "Unaligned fspacectl to OFF_MAX failed; errno=%d", errno); ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, - "Unaligned fspacectl to OFF_MAX content checking failed", errno); + "Unaligned fspacectl to OFF_MAX content checking failed"); /* Aligned fspacectl(fd, SPACECTL_DEALLOC, ...) past shm_sz */ ATF_REQUIRE(shm_fill(fd, 0, shm_sz) == 0); @@ -1142,7 +1142,7 @@ ATF_TC_BODY(fspacectl, tc) ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, "Aligned fspacectl past shm_sz failed; errno=%d", errno); ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, - "Aligned fspacectl past shm_sz content checking failed", errno); + "Aligned fspacectl past shm_sz content checking failed"); /* Unaligned fspacectl(fd, SPACECTL_DEALLOC, ...) past shm_sz */ ATF_REQUIRE(shm_fill(fd, 0, shm_sz) == 0); @@ -1151,7 +1151,7 @@ ATF_TC_BODY(fspacectl, tc) ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, "Unaligned fspacectl past shm_sz failed; errno=%d", errno); ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, - "Unaligned fspacectl past shm_sz content checking failed", errno); + "Unaligned fspacectl past shm_sz content checking failed"); ATF_REQUIRE(close(fd) == 0); } @@ -1251,9 +1251,7 @@ ATF_TC_BODY(largepage_config, tc) struct shm_largepage_conf lpc; char *addr, *buf; size_t ps[MAXPAGESIZES + 1]; /* silence warnings if MAXPAGESIZES == 1 */ - int error, fd, pscnt; - - pscnt = pagesizes(ps); + int error, fd; fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0); ATF_REQUIRE_MSG(fd >= 0, "shm_open failed; error=%d", errno);