mirror of
https://github.com/vimpunk/mio.git
synced 2026-10-28 18:07:20 +08:00
Default initialise is_handle_internal_
gcc12 flags `is_handle_internal_` as maybe being uninitialised. This PR adds a default initialisation for `is_handle_internal_` to avoid this.
```
/usr/local/include/mio/detail/mmap.ipp:419:8: warning: '<anonymous>.mio::basic_mmap<mio::access_mode::write, char>::is_handle_internal_' may be used uninitialized [-Wmaybe-uninitialized]
419 | if(is_handle_internal_)
| ^~~~~~~~~~~~~~~~~~~
```
This commit is contained in:
parent
3f86a95c07
commit
d37d75dfeb
@ -97,7 +97,7 @@ private:
|
||||
// user provided it, but we must close it if we obtained it using the
|
||||
// provided path. For this reason, this flag is used to determine when to
|
||||
// close `file_handle_`.
|
||||
bool is_handle_internal_;
|
||||
bool is_handle_internal_{false};
|
||||
|
||||
public:
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user