From: Nadav Har'El <n...@scylladb.com> Committer: Waldemar Kozaczuk <jwkozac...@gmail.com> Branch: master
tests: fix warning in tst-epoll.cc tst-poll.cc has a function write_one() which writes one byte. We didn't care which byte we were writing, so we didn't bother to initialize the variable holding this byte. But gcc 11 warns about this. The solution is to initialize this byte to something - e.g., 0. Signed-off-by: Nadav Har'El <n...@scylladb.com> Message-Id: <20210615215218.42660-1-...@scylladb.com> --- diff --git a/tests/tst-epoll.cc b/tests/tst-epoll.cc --- a/tests/tst-epoll.cc +++ b/tests/tst-epoll.cc @@ -32,7 +32,7 @@ static void report(bool ok, std::string msg) static void write_one(int fd) { - char c; + char c = 0; int w = write(fd, &c, 1); report(w == 1, "write"); } -- 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 osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/00000000000036747705c4e970e9%40google.com.