Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2021 16:05:31 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: cd16a848d1b3 - main - posixshmtest: Fix various warnings raised by GCC.
Message-ID:  <202109151605.18FG5Vu3086506@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=cd16a848d1b34016b1a1c663223729a92c247be3

commit cd16a848d1b34016b1a1c663223729a92c247be3
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-09-15 16:03:18 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109151605.18FG5Vu3086506>