diff options
author | Alan Somers <asomers@FreeBSD.org> | 2019-05-26 03:52:35 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2019-05-26 03:52:35 +0000 |
commit | cc04566c466abdc10dcf96bd1b6d4e2d78771c7e (patch) | |
tree | f2f1f0800f0d8c1f696d6122a2bf29b2c1599484 /tests/sys/fs/fusefs/read.cc | |
parent | 93fecd02a11f5ca545f529bde1c27b2d54773fcd (diff) | |
download | src-cc04566c466abdc10dcf96bd1b6d4e2d78771c7e.tar.gz src-cc04566c466abdc10dcf96bd1b6d4e2d78771c7e.zip |
fusefs: more build fixes
* Fix printf format strings on 32-bit OSes
* Fix -Wclass-memaccess violation on GCC-8 caused by using memset on an object
of non-trivial type.
* Fix memory leak in MockFS::init
* Fix -Wcast-align error on i386 in expect_readdir
* Fix some heterogenous comparison errors on 32-bit OSes.
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/projects/fuse2/; revision=348285
Diffstat (limited to 'tests/sys/fs/fusefs/read.cc')
-rw-r--r-- | tests/sys/fs/fusefs/read.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 8cf40144fb47..f86de3cdc0a4 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -486,9 +486,8 @@ TEST_F(ReadCacheable, mmap) uint64_t ino = 42; int fd; ssize_t len; - ssize_t bufsize = strlen(CONTENTS); + size_t bufsize = strlen(CONTENTS); void *p; - //char buf[bufsize]; len = getpagesize(); @@ -674,7 +673,7 @@ TEST_F(ReadCacheable, sendfile) const char *CONTENTS = "abcdefgh"; uint64_t ino = 42; int fd; - ssize_t bufsize = strlen(CONTENTS); + size_t bufsize = strlen(CONTENTS); char buf[bufsize]; int sp[2]; off_t sbytes; @@ -703,7 +702,8 @@ TEST_F(ReadCacheable, sendfile) ASSERT_EQ(0, sendfile(fd, sp[1], 0, bufsize, NULL, &sbytes, 0)) << strerror(errno); - ASSERT_EQ(bufsize, read(sp[0], buf, bufsize)) << strerror(errno); + ASSERT_EQ((ssize_t)bufsize, read(sp[0], buf, bufsize)) + << strerror(errno); ASSERT_EQ(0, memcmp(buf, CONTENTS, bufsize)); close(sp[1]); |