mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-27 17:49:37 +01:00
subprocess: Fix -Wunused-private-field for Child class on Windows
When compiling with clang-cl on Windows, `src/util/subprocess.h` emits `-Wunused-private-field` warnings about unused private fields in the `Child` class.
This commit is contained in:
@@ -738,6 +738,7 @@ private:
|
||||
Popen* popen_ = nullptr;
|
||||
};
|
||||
|
||||
#ifndef __USING_WINDOWS__
|
||||
/*!
|
||||
* A helper class to Popen.
|
||||
* This takes care of all the fork-exec logic
|
||||
@@ -759,6 +760,7 @@ private:
|
||||
Popen* parent_ = nullptr;
|
||||
int err_wr_pipe_ = -1;
|
||||
};
|
||||
#endif
|
||||
|
||||
// Fwd Decl.
|
||||
class Streams;
|
||||
@@ -932,7 +934,9 @@ class Popen
|
||||
{
|
||||
public:
|
||||
friend struct detail::ArgumentDeducer;
|
||||
#ifndef __USING_WINDOWS__
|
||||
friend class detail::Child;
|
||||
#endif
|
||||
|
||||
template <typename... Args>
|
||||
Popen(const std::string& cmd_args, Args&& ...args):
|
||||
@@ -1275,8 +1279,8 @@ namespace detail {
|
||||
}
|
||||
|
||||
|
||||
inline void Child::execute_child() {
|
||||
#ifndef __USING_WINDOWS__
|
||||
inline void Child::execute_child() {
|
||||
int sys_ret = -1;
|
||||
auto& stream = parent_->stream_;
|
||||
|
||||
@@ -1336,8 +1340,8 @@ namespace detail {
|
||||
// Calling application would not get this
|
||||
// exit failure
|
||||
_exit (EXIT_FAILURE);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
inline void Streams::setup_comm_channels()
|
||||
|
||||
Reference in New Issue
Block a user