The compiler correctly warns that we can't fill 4097 bytes of an array
size 4096 (=PATH_MAX). I don't know why this code had 4097 in the first
place.
The test still passes with this fix, and the warning is gone.
Refs #976.
Signed-off-by: Nadav Har'El <
n...@scylladb.com>
---
tests/tst-symlink.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tst-symlink.cc b/tests/tst-symlink.cc
index 78100ea0..0eff52f3 100644
--- a/tests/tst-symlink.cc
+++ b/tests/tst-symlink.cc
@@ -269,7 +269,7 @@ int main(int argc, char **argv)
report(rc < 0, "symlink");
report(error == ENAMETOOLONG, "ENAMETOOLONG expected 1");
- fill_buf(path, 4097);
+ fill_buf(path, PATH_MAX);
unlink(N1);
rc = symlink(path, N1);
error = errno;
--
2.21.0