From 02820e5e4e69197a3816f11d8333bb5e277bfb12 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sat, 14 Jan 2017 04:00:26 +0000 Subject: [PATCH] Bump WARNS up to 6 again Has not been tested (can't be after r312103 without cem's hacks to atf/kyua)! --- tests/sys/vfs/Makefile | 2 ++ tests/sys/vfs/lookup_cap_dotdot.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/sys/vfs/Makefile b/tests/sys/vfs/Makefile index 9e2d79ef773a..43fde788f652 100644 --- a/tests/sys/vfs/Makefile +++ b/tests/sys/vfs/Makefile @@ -9,4 +9,6 @@ CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP}/tests PLAIN_TESTS_SH+= trailing_slash +WARNS?= 6 + .include diff --git a/tests/sys/vfs/lookup_cap_dotdot.c b/tests/sys/vfs/lookup_cap_dotdot.c index 88b13e59abe2..c1a90cc2af5f 100644 --- a/tests/sys/vfs/lookup_cap_dotdot.c +++ b/tests/sys/vfs/lookup_cap_dotdot.c @@ -43,11 +43,11 @@ static int dirfd = -1; static char *abspath; static void -touchat(int dirfd, const char *name) +touchat(int _dirfd, const char *name) { int fd; - ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, + ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, 0777)) >= 0); ATF_REQUIRE(close(fd) == 0); } @@ -117,7 +117,6 @@ ATF_TC_HEAD(lookup_cap_dotdot__basic, tc) ATF_TC_BODY(lookup_cap_dotdot__basic, tc) { cap_rights_t rights; - int fd; check_capsicum(); prepare_dotdot_tests(); @@ -141,7 +140,6 @@ ATF_TC_HEAD(lookup_cap_dotdot__advanced, tc) ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) { cap_rights_t rights; - int fd; check_capsicum(); prepare_dotdot_tests(); @@ -220,7 +218,6 @@ ATF_TC_HEAD(lookup_cap_dotdot__negative, tc) ATF_TC_BODY(lookup_cap_dotdot__negative, tc) { cap_rights_t rights; - int fd; check_capsicum(); prepare_dotdot_tests();