Skip to content

Commit

Permalink
Initialize arrays in lo2s::Pipe
Browse files Browse the repository at this point in the history
More modern compilers complain about fds_ and fd_open_ being uninitialized, so initialize them
  • Loading branch information
cvonelm committed Apr 16, 2024
1 parent f7788bd commit 4adf5fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/lo2s/pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4adf5fb

Please sign in to comment.