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 <[email protected]> --- 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 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/20191128083555.9305-1-nyh%40scylladb.com.
