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>
---
tests/tst-epoll.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tst-epoll.cc b/tests/tst-epoll.cc
index 82658964..30322240 100644
--- 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");
}
--
2.31.1