From 33d7e3ee781b9ac620b4a49c472c63948e51b08c Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Fri, 29 Mar 2019 21:41:14 +0000 Subject: Merge the following changes from the capsicum-test project [1] Log: ``` commit feb47278d7cffa8cf4bc8c8ff78047126fa41e82 (HEAD -> dev, origin/dev, origin/HEAD) Author: ngie-eign <1574099+ngie-eign@users.noreply.github.com> Date: Fri Mar 22 10:51:04 2019 -0700 Remove `FAIL` macro use for non-x86 architectures when testing `sysarch(2)` (#38) `FAIL()` does not support being called in the form noted in the test, which causes a test failure on non-x86 architectures. The alternatives (use `ADD_TEST_FAILURE()` or `GTEST_SKIP()`) would be misleading (in both cases), and in the case of `GTEST_SKIP()` is unavailable on the version of googletest packaged with capsicum-test. Signed-off-by: Enji Cooper commit 32ad0f3e4c11be7f7463d40eef8d4a78ac9f61a5 Author: Enji Cooper Date: Fri Mar 15 20:01:56 2019 -0700 Fix `-Wunused-parameter` issues Remove variable declarations from functions/methods where the variable is not required. Signed-off-by: Enji Cooper commit 9437b4c550110200ef190ac39fb26c1d8fc55d9a Author: Enji Cooper Date: Fri Mar 15 19:59:00 2019 -0700 Fix `-Wshadow` issues with `EXPECT_OPEN_OK(..)` macro * Wrap in do-while(0) block to avoid variable shadowing issue with multiple calls in the same function. * Prefix block local variables with `_` to try and avoid variable name clashes with values local to test methods. Signed-off-by: Enji Cooper commit adf4a21a233b5da5cac440f4006e258ffba09510 Author: Enji Cooper Date: Fri Mar 15 19:55:00 2019 -0700 Fix `-Wmissing-variable-declarations` issue with `known_rights` global Staticize it since it is only used in the file. Signed-off-by: Enji Cooper ``` This merges a number of the outstanding changes made locally to ^/projects/capsicum-test that were accepted into the upstream project. The sync was done like so: ``` curl -L https://github.com/google/capsicum-test/tarball/dd7eac98c0cf | tar --strip-components=1 -xvzf - -C dist/ rm -Rf dist/*/ ``` 1. https://github.com/google/capsicum-test --- syscalls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'syscalls.h') diff --git a/syscalls.h b/syscalls.h index c78576074ef2..592a1677e1f1 100644 --- a/syscalls.h +++ b/syscalls.h @@ -53,7 +53,7 @@ inline ssize_t flistxattr_(int fd, char *list, size_t size) { inline ssize_t fgetxattr_(int fd, const char *name, void *value, size_t size) { return extattr_get_fd(fd, EXTATTR_NAMESPACE_USER, name, value, size); } -inline int fsetxattr_(int fd, const char *name, const void *value, size_t size, int flags) { +inline int fsetxattr_(int fd, const char *name, const void *value, size_t size, int) { return extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, name, value, size); } inline int fremovexattr_(int fd, const char *name) { -- cgit v1.2.3