From d952fe22d2d7487f6a37ec938d07521dfed477a3 Mon Sep 17 00:00:00 2001 From: Christian von Elm Date: Wed, 10 Apr 2024 09:41:51 +0200 Subject: [PATCH] Initialize arrays in lo2s::Pipe More modern compilers complain about fds_ and fd_open_ being uninitialized, so initialize them --- include/lo2s/pipe.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lo2s/pipe.hpp b/include/lo2s/pipe.hpp index fbde33ae..9b017ee7 100644 --- a/include/lo2s/pipe.hpp +++ b/include/lo2s/pipe.hpp @@ -59,7 +59,7 @@ class Pipe void fd_flags(std::size_t fd, int flags); void close_fd(std::size_t fd); - int fds_[2]; - bool fd_open_[2]; + int fds_[2] = { -1, -1 }; + bool fd_open_[2] = { false, false }; }; } // namespace lo2s