diff --git a/src/fs/io/FileOutputStream.hxx b/src/fs/io/FileOutputStream.hxx index 9d8e0ad16..aae647353 100644 --- a/src/fs/io/FileOutputStream.hxx +++ b/src/fs/io/FileOutputStream.hxx @@ -41,22 +41,20 @@ class BaseFileOutputStream : public OutputStream { const AllocatedPath path; #ifdef WIN32 - HANDLE handle; + HANDLE handle = INVALID_HANDLE_VALUE; #else - FileDescriptor fd; + FileDescriptor fd = FileDescriptor::Undefined(); #endif protected: #ifdef WIN32 template BaseFileOutputStream(P &&_path) - :path(std::forward

(_path)), - handle(INVALID_HANDLE_VALUE) {} + :path(std::forward

(_path)) {} #else template BaseFileOutputStream(P &&_path) - :path(std::forward

(_path)), - fd(FileDescriptor::Undefined()) {} + :path(std::forward

(_path)) {} #endif ~BaseFileOutputStream() {